substrate_hashers/substrate_hashers library

Classes

Blake2bHasher
Blake2b hash
Blake3Hasher
Blake3 hash
BlockHashBase
BlockHashSink
HashBase
The base class used by the hash algorithm implementations. It implements the StreamTransformer and exposes few convenient methods to handle any types of data source.
HashDigest
HashDigestSink
This sink allows adding arbitrary length byte arrays and produces a HashDigest on close.
Hasher
StorageDoubleMap<K1, K2, V>
StorageHasher<K>
StorageMap<K, V>
StorageNMap<V>
StorageQuadrupleMap<K1, K2, K3, K4, V>
StorageQuintupleMap<K1, K2, K3, K4, K5, V>
StorageSextupleMap<K1, K2, K3, K4, K5, K6, V>
StorageTripleMap<K1, K2, K3, V>
StorageValue<V>
TwoxxHasher
XX hash
XXHash64
XXHash64 is a fast and efficient non-cryptographic hash function for 64-bit platforms. It is designed for producing a quick and reliable hash value for a given data, which can be used for many applications, such as checksum, data validation, etc. In addition, it has a good distribution of hash values, which helps to reduce collisions.
XXHash64Sink
This implementation is derived from https://github.com/easyaspi314/xxhash-clean/blob/master/xxhash64-ref.c

Extensions

XXHash64StringExtension on String
Extension to String to generate xxh64 code.

Constants

xxh64 → const XXHash64
An instance of XXHash64 with seed = 0

Functions

asHexString(List<int> bytes) String
blake3(List<int> input, [dynamic outputLength = 32]) List<int>
blake3Hex(List<int> input, [dynamic outputLength = 32]) String
xxh64code(String input, [Encoding? encoding]) int
Gets the 64-bit xxHash value of a String.
xxh64sum(String input, [Encoding? encoding]) String
Gets the 64-bit xxHash hash of a String in hexadecimal.