crypto/crypto library

Functions

doubleHash(Uint8List buffer) Uint8List
This function calculates a double SHA-256 hash of the provided input buffer. Double hashing is commonly used in blockchain and cryptographic applications.
generateRandom({int size = 32}) Uint8List
This function generates a random Uint8List of the specified size (default is 32 bytes).
hash160(Uint8List buffer) Uint8List
This function calculates the hash160 digest of a given Uint8List buffer.
hmacSHA512(Uint8List key, Uint8List data) Uint8List
This function calculates the HMAC-SHA-512 digest of a given key and data using HMAC (Hash-based Message Authentication Code). HMAC is a method for verifying both the data integrity and authenticity of a message.
keccak256(Uint8List input) Uint8List
This function computes the Keccak-256 hash (SHA-3) of the given input data. It resets the KeccakDigest instance before processing the input. It returns a Uint8List representing the Keccak-256 hash.
pbkdfDeriveDigest(String mnemonic, String salt) Uint8List
This function derives a key from a mnemonic passphrase and a salt using the PBKDF2 algorithm with SHA-512. It returns a Uint8List representing the derived key.
singleHash(Uint8List buffer) Uint8List
This function calculates a single SHA-256 hash of the provided input buffer. It computes a one-time SHA-256 hash without any further processing.