sign library

Sign messages with public and secret key. Maps libsodium's crypto_sign_* api.

Classes

KeyPair
Pair of public and secret key.
SignStream
Generates signature for a multi-part message.
VerifyStream
Stream to verify the signature of a multi-part message

Mixins

Update

Properties

publicKeyBytes int
final
secretKeyBytes int
final

Functions

open(Uint8List signedMessage, Uint8List publicKey, {dynamic onError()}) Uint8List
Verifies the signature of signedMessage generated by sign and extracts the message. Throws InvalidSignatureError when signature is invalid. When onError is provided, no Exception will be thrown and null will be returned.
sign(Uint8List message, Uint8List secretKey) Uint8List
Signs message with secretKey. secretKey must be secretKeyBytes long.

Exceptions / Errors

InitStreamException
InvalidSignatureError
SignError
UpdateStreamException