auth library

Message authentication via secret key. Maps libsodium's crypto_auth_* api.

Properties

authBytes int
final
keyBytes int
final

Functions

auth(Uint8List message, Uint8List key) Uint8List
Generates an authentication tag for message. key must be keyBytes long. Throws AuthException when generating authentication tag fails.
keyGen() UnmodifiableUint8ListView
Generates a key for auth.
verify(Uint8List authTag, Uint8List message, Uint8List key) bool
Verifies authenticity of message given its authTag generated by auth.

Exceptions / Errors

AuthException