[−][src]Crate tiny_multihash
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
Blake2bDigest | Multihash digest. |
Blake2bHasher | Multihash hasher. |
Blake2sDigest | Multihash digest. |
Blake2sHasher | Multihash hasher. |
IdentityDigest | Multihash digest. |
IdentityHasher | Identity hasher with a maximum size. |
Keccak224 | Multihash hasher. |
Keccak256 | Multihash hasher. |
Keccak384 | Multihash hasher. |
Keccak512 | Multihash hasher. |
KeccakDigest | Multihash digest. |
RawMultihash | A Multihash instance that only supports the basic functionality and no hashing. |
Sha1 | Multihash hasher. |
Sha1Digest | Multihash digest. |
Sha2Digest | Multihash digest. |
Sha2_256 | Multihash hasher. |
Sha2_512 | Multihash hasher. |
Sha3Digest | Multihash digest. |
Sha3_224 | Multihash hasher. |
Sha3_256 | Multihash hasher. |
Sha3_384 | Multihash hasher. |
Sha3_512 | Multihash hasher. |
StrobeDigest | Multihash digest. |
StrobeHasher | Strobe hasher. |
UnknownDigest | Multihash digest. |
WriteHasher | New type wrapper for a hasher that implements the |
Enums
Error | Multihash error. |
Multihash | Default (cryptographically secure) Multihash implementation. |
Constants
BLAKE2B_256 | Multihash code for BLAKE2b-256. |
BLAKE2B_512 | Multihash code for BLAKE2b-512. |
BLAKE2S_128 | Multihash code for BLAKE2s-128. |
BLAKE2S_256 | Multihash code for BLAKE2s-256. |
IDENTITY | Multihash code for Identity. |
KECCAK_224 | Multihash code for KECCAK-224. |
KECCAK_256 | Multihash code for KECCAK-256. |
KECCAK_384 | Multihash code for KECCAK-384. |
KECCAK_512 | Multihash code for KECCAK-512. |
SHA1 | Multihash code for SHA1. |
SHA2_256 | Multihash code for SHA2-256. |
SHA2_512 | Multihash code for SHA2-512. |
SHA3_224 | Multihash code for SHA3-224. |
SHA3_256 | Multihash code for SHA3-256. |
SHA3_384 | Multihash code for SHA3-384. |
SHA3_512 | Multihash code for SHA3-512. |
Traits
Digest | Stack allocated digest trait. |
Hasher | Trait implemented by a hash function implementation. |
MultihashDigest | Trait for reading and writhing Multihashes. |
Size | Size marker trait. |
StatefulHasher | Trait implemented by a hash function implementation. |
Type Definitions
Blake2b256 | 256 bit blake2b hasher. |
Blake2b512 | 512 bit blake2b hasher. |
Blake2s128 | 256 bit blake2b hasher. |
Blake2s256 | 512 bit blake2b 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 |