Expand description
Multihash implementation.
§Feature Flags
Multihash has lots of feature flags, by default, all features (except for test
) are
enabled.
Some of them are about specific hash functions, these are:
blake2b
: Enable Blake2b hashersblake2s
: Enable Blake2s hasherssha1
: Enable SHA-1 hasherssha2
: Enable SHA-2 hasherssha3
: Enable SHA-3 hashersstrobe
: Enable Strobe hashers
In order to enable all hashers, you can set the all
feature flag.
The library has support for no_std
, if you disable the std
feature flag.
The multihash-impl
feature flag enables a default Multihash implementation that contains all
bundled hashers (which may be disabled via the feature flags mentioned above). If only want a
specific subset of hash algorithms or add one which isn’t supporte by default, you will likely
disable that feature and enable derive
in order to be able to use the Multihash
derive.
The test
feature flag enables property based testing features.
Re-exports§
pub use generic_array::typenum;
pub use tiny_multihash_derive as derive;
Structs§
- Blake2b
Digest - Multihash digest.
- Blake2b
Hasher - Multihash hasher.
- Blake2s
Digest - Multihash digest.
- Blake2s
Hasher - Multihash hasher.
- Blake3
Digest - Multihash digest.
- Blake3
Hasher - Multihash hasher.
- Identity
Digest - Multihash digest.
- Identity
Hasher - Identity hasher with a maximum size.
- Keccak224
- Multihash hasher.
- Keccak256
- Multihash hasher.
- Keccak384
- Multihash hasher.
- Keccak512
- Multihash hasher.
- Keccak
Digest - Multihash digest.
- Multihash
- A Multihash instance that only supports the basic functionality and no hashing.
- Sha1
- Multihash hasher.
- Sha1
Digest - Multihash digest.
- Sha2
Digest - Multihash digest.
- Sha2_
256 - Multihash hasher.
- Sha2_
512 - Multihash hasher.
- Sha3
Digest - Multihash digest.
- Sha3_
224 - Multihash hasher.
- Sha3_
256 - Multihash hasher.
- Sha3_
384 - Multihash hasher.
- Sha3_
512 - Multihash hasher.
- Strobe
Digest - Multihash digest.
- Strobe
Hasher - Strobe hasher.
- Unknown
Digest - Multihash digest.
- Write
Hasher - New type wrapper for a hasher that implements the
std::io::Write
trait.
Enums§
Traits§
- Digest
- Stack allocated digest trait.
- Hasher
- Trait implemented by a hash function implementation.
- Multihash
Code - Trait that implements hashing.
- Size
- Size marker trait.
- Stateful
Hasher - Trait implemented by a hash function implementation.
Type Aliases§
- Blake2b256
- 256 bit blake2b hasher.
- Blake2b512
- 512 bit blake2b hasher.
- Blake2s128
- 256 bit blake2b hasher.
- Blake2s256
- 512 bit blake2b hasher.
- Blake3_
256 - blake3-256 hasher.
- Identity256
- 32 byte Identity hasher (constrained to 32 bytes).
- Result
- Multihash result.
- Strobe256
- 256 bit strobe hasher.
- Strobe512
- 512 bit strobe hasher.
- U16
- U20
- U28
- U32
- U48
- U64
- U128