cryptography library
Cryptographic algorithms for Dart / Flutter developers.
Main algorithm types
 Cipher for encrypting and decrypting
 KeyExchangeAlgorithm for key exchange
 KdfAlgorithm for key derivation
 HashAlgorithm for hashing
 MacAlgorithm for message authentication
 SignatureAlgorithm for signing and verifying
Factory methods
Cryptography contains factory methods for cryptographic algorithms.
Classes
 AesCbc
 AESCBC (cipher block chaining mode) Cipher.
 AesCtr
 AESCTR (counter mode) Cipher.
 AesGcm
 AESGCM (Galois/Counter Mode) Cipher.
 Argon2id
 Argon2id (RFC 9106) memoryhard password hashing function.
 Blake2b
 BLAKE2B (RFC 7693), which can be used both as HashAlgorithm and MacAlgorithm.
 Blake2s
 BLAKE2S (RFC 7693), which can be used both as HashAlgorithm and MacAlgorithm.
 BrowserCryptography
 An implementation of Cryptography that uses Web Cryptography API for better performance in browsers.
 Chacha20
 ChaCha20 (RFC 7539) StreamingCipher.
 Cipher
 A cipher that supports encrypt() and decrypt().
 CipherState
 A state of Cipher, which helps you to encrypt or decrypt data that does not fit in memory.
 CipherWand
 An opaque object that possesses some nonextractable secret key.
 Cryptography
 A factory for cryptographic algorithms.
 Ecdh
 ECDH with P256 / P384 / P521 elliptic curve.
 Ecdsa
 ECDSA with P256 / P384 / P521 elliptic curve.
 EcKeyPair
 An opaque reference to P256 / P384 / P521 key pair.
 EcKeyPairData
 P256 / P384 / P521 key pair.
 EcPublicKey
 Public key of P256 / P384 / P521 key pair.
 Ed25519
 Ed25519 (RFC 8032) signature algorithm.
 Hash
 A digest calculated with some HashAlgorithm.
 HashAlgorithm
 A hash algorithm that produces a Hash.
 HashSink
 A sink for calculating Hash for long sequences.
 Hchacha20
 Hchacha20 (draftirtfcfrgxchacha) key derivation algorithm.
 Hkdf
 HKDF (RFC 5869) key derivation algorithm.
 Hmac
 HMAC, a widely used MacAlgorithm.
 KdfAlgorithm
 Abstract superclass for Key Derivation Algorithms (KDFs).
 KeyExchangeAlgorithm
 Abstract superclass for key exchange algorithms.
 KeyExchangeWand
 An opaque object that has some key pair and support for sharedSecretKey.
 KeyPair
 A key pair composed of a private key (KeyPairData) and PublicKey.
 KeyPairData
 Extracted data of a KeyPair.

KeyPairType<
S extends KeyPairData, P extends PublicKey>  Static information about a key pair type.
 Mac
 A Message Authentication Code (MAC). Usually obtained from some MacAlgorithm.
 MacAlgorithm
 A Message Authentication Code (MAC) algorithm.
 MacSink
 A sink for calculating a Mac.
 PaddingAlgorithm
 Padding algorithm for block ciphers.
 Pbkdf2
 PBKDF2 password hashing algorithm implemented in pure Dart.
 Poly1305
 Poly1305 (RFC 7539) MacAlgorithm.
 PublicKey
 A public key of some KeyPair.
 RsaKeyPair
 Opaque reference to RSA key pair.
 RsaKeyPairData
 RSA private key.
 RsaPss
 RSAPSS SignatureAlgorithm.
 RsaPublicKey
 RSA public key.
 RsaSsaPkcs1v15
 RSASSAPKCS1v15 SignatureAlgorithm.
 SecretBox
 Output of encrypting bytes with a Cipher.
 SecretKey
 An opaque reference to a secret sequence of bytes used for encryption and message authentication.
 SecretKeyData
 A SecretKey that is stored in memory.
 SecureRandom
 An abstract base class for reasonably secure Random implementations.
 SensitiveBytes
 List of securitysensitive bytes that can be destroyed with destroy.
 Sha1
 SHA1 HashAlgorithm.
 Sha224
 SHA224 (SHA2224) HashAlgorithm.
 Sha256
 SHA256 (SHA2256) HashAlgorithm.
 Sha384
 SHA384 (SHA2384) HashAlgorithm.
 Sha512
 SHA512 HashAlgorithm (sometimes called SHA2512).
 Signature
 A digital signature by some SignatureAlgorithm.

SignatureAlgorithm<
T extends PublicKey>  An digital signature algorithm that supports newKeyPair(), sign(), verify().
 SignatureWand
 An opaque object that has some key pair and support for sign.
 SimpleKeyPair
 An opaque KeyPair that is made of two simple byte sequences.
 SimpleKeyPairData
 An inmemory SimpleKeyPair that is made of two simple byte sequences.
 SimplePublicKey
 A PublicKey that is a sequence of bytes.
 StreamingCipher
 Superclass of streaming ciphers such as AesGcm and Chacha20 that allow encrypter/decrypter to choose an offset in the keystream.
 Wand
 Superclass of SignatureWand, KeyExchangeWand, and CipherWand.
 X25519
 X25519 (RFC 7748) KeyExchangeAlgorithm.
 Xchacha20
 Xchacha20 (draftirtfcfrgxchacha). cipher.
Exceptions / Errors
 SecretBoxAuthenticationError
 Error thrown by Cipher.decrypt when SecretBox has incorrect Mac.
 SecretBoxPaddingError
 Thrown by Cipher if invalid padding is found during SecretBox decryption.