CryptoSign class
Computes a signature for a message using a secret key, and provides verification using a public key.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
extractPublicKey(
Uint8List secretKey) → Uint8List - Extracts the public key from the secret key
-
extractSeed(
Uint8List secretKey) → Uint8List - Extracts the seed from the secret key
-
open(
Uint8List signedMessage, Uint8List publicKey) → Uint8List - Checks the signed message using given public key and returns the message with the signature removed.
-
openString(
Uint8List signedMessage, Uint8List publicKey) → String - Checks the signed message using given public key and returns the string message with the signature removed.
-
randomKeys(
) → KeyPair - Generates a random key for use with public-key signatures.
-
randomSeed(
) → Uint8List - Generates a random seed for use in seedKeys.
-
seedKeys(
Uint8List seed) → KeyPair - Generates a secret key and a corresponding public key for given seed.
-
sign(
Uint8List message, Uint8List secretKey) → Uint8List - Prepends a signature to specified message for given secret key.
-
signDetached(
Uint8List message, Uint8List secretKey) → Uint8List - Computes a signature for given message and secret key.
-
signStream(
Stream< Uint8List> stream, Uint8List secretKey) → Future<Uint8List> - Computes a signature for given stream and secret key.
-
signString(
String message, Uint8List secretKey) → Uint8List - Prepends a signature to specified string message for given secret key.
-
signStringDetached(
String message, Uint8List secretKey) → Uint8List - Computes a signature for given string message and secret key.
-
signStrings(
Stream< String> stream, Uint8List secretKey) → Future<Uint8List> - Computes a signature for given stream of strings and secret key.
-
verify(
Uint8List signature, Uint8List message, Uint8List publicKey) → bool - Verifies whether the signature is valid for given message using the signer's public key.
-
verifyStream(
Uint8List signature, Stream< Uint8List> stream, Uint8List publicKey) → Future<bool> - Verifies whether the signature is valid for given stream using the signer's public key.
-
verifyString(
Uint8List signature, String message, Uint8List publicKey) → bool - Verifies whether the signature is valid for given string message using the signer's public key.
-
verifyStrings(
Uint8List signature, Stream< String> stream, Uint8List publicKey) → Future<bool> - Verifies whether the signature is valid for given stream using the signer's public key.