CryptoBox class
Public-key authenticated encryption
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
-
decrypt(
Uint8List cipherText, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → Uint8List - Verifies and decrypts a cipher text produced by encrypt.
-
decryptAfternm(
Uint8List cipherText, Uint8List nonce, Uint8List k) → Uint8List - Verifies and decrypts a cipher text produced by encrypt.
-
decryptDetached(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → Uint8List - Verifies and decrypts a detached cipher text and tag.
-
decryptDetachedAfternm(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List k) → Uint8List - Verifies and decrypts a detached cipher text and tag.
-
decryptString(
Uint8List cipherText, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → String - Verifies and decrypts a cipher text produced by encrypt.
-
decryptStringAfternm(
Uint8List cipherText, Uint8List nonce, Uint8List k) → String - Verifies and decrypts a cipher text produced by encrypt.
-
decryptStringDetached(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → String - Verifies and decrypts a detached cipher text and tag.
-
decryptStringDetachedAfternm(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List k) → String - Verifies and decrypts a detached cipher text and tag.
-
encrypt(
Uint8List value, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → Uint8List - Encrypts a message with a key and a nonce.
-
encryptAfternm(
Uint8List value, Uint8List nonce, Uint8List k) → Uint8List - Encrypts a message with a key and a nonce.
-
encryptDetached(
Uint8List value, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → DetachedCipher - Encrypts a message with a key and a nonce, returning the encrypted message and authentication tag
-
encryptDetachedAfternm(
Uint8List value, Uint8List nonce, Uint8List k) → DetachedCipher - Encrypts a message with a key and a nonce, returning the encrypted message and authentication tag
-
encryptString(
String value, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → Uint8List - Encrypts a string message with a key and a nonce.
-
encryptStringAfternm(
String value, Uint8List nonce, Uint8List k) → Uint8List - Encrypts a string message with a key and a nonce.
-
encryptStringDetached(
String value, Uint8List nonce, Uint8List publicKey, Uint8List secretKey) → DetachedCipher - Encrypts a string message with a key and a nonce, returning the encrypted message and authentication tag
-
encryptStringDetachedAfternm(
String value, Uint8List nonce, Uint8List k) → DetachedCipher - Encrypts a string message with a key and a nonce, returning the encrypted message and authentication tag
-
randomKeys(
) → KeyPair - Generates a random secret key and a corresponding public key.
-
randomNonce(
) → Uint8List - Generates a random nonce for use with public key-authenticated encryption.
-
randomSeed(
) → Uint8List - Generates a random seed for use in seedKeys.
-
seedKeys(
Uint8List seed) → KeyPair - Generates a secret key and a corresponding public key using given seed.
- Computes a shared secret key given a public key and a secret key for use in precalculation interface.