generate

fun generate(counter: Long): String

Generates a code representing a HMAC-based one-time password.

Return

The generated code for the provided counter value. Note, that the code must be represented as a string because it can have trailing zeros to meet the code digits requirement from the configuration.