One Time Message Authentication
The secretKey MUST remain secret or an attacker could forge valid authenticator tokens
If key is not given a new random key is generated
Parameters
[secretKey]: String|Buffer|Array, A valid auth secret key
Size of the authentication token
String name of the default crypto primitive used in onetimeauth operations
Get the auth-key secret key object
Set the default encoding to use in all string conversions
Parameters
encoding: String, encoding to use
Get the current default encoding
Generate authentication token for message, based on the secret key
Parameters
message: string|Buffer|Array, message to authenticate
[encoding: String, ] If v is a string you can specify the encoding
Checks if the token authenticates the message
Parameters
token: String|Buffer|Array, message token
message: String|Buffer|Array, message to authenticate
[encoding]: String, If v is a string you can specify the encoding