Enum Code Copy item path Source pub enum Code {
Show 18 variants Sha2_256,
Sha2_512,
Sha3_224,
Sha3_256,
Sha3_384,
Sha3_512,
Keccak224,
Keccak256,
Keccak384,
Keccak512,
Blake2b256,
Blake2b512,
Blake2s128,
Blake2s256,
Blake3_256,
Ripemd160,
Ripemd256,
Ripemd320,
}Expand description Default (cryptographically secure) Multihash implementation.
This is a default set of hashing algorithms. Usually applications would use their own subset of
algorithms. See the multihash-derive crate for more information.
Available on crate feature sha2 only.
SHA-256 (32-byte hash size)
Available on crate feature sha2 only.
SHA-512 (64-byte hash size)
Available on crate feature sha3 only.
SHA3-224 (28-byte hash size)
Available on crate feature sha3 only.
SHA3-256 (32-byte hash size)
Available on crate feature sha3 only.
SHA3-384 (48-byte hash size)
Available on crate feature sha3 only.
SHA3-512 (64-byte hash size)
Available on crate feature sha3 only.
Keccak-224 (28-byte hash size)
Available on crate feature sha3 only.
Keccak-256 (32-byte hash size)
Available on crate feature sha3 only.
Keccak-384 (48-byte hash size)
Available on crate feature sha3 only.
Keccak-512 (64-byte hash size)
Available on crate feature blake2b only.
BLAKE2b-256 (32-byte hash size)
Available on crate feature blake2b only.
BLAKE2b-512 (64-byte hash size)
Available on crate feature blake2s only.
BLAKE2s-128 (16-byte hash size)
Available on crate feature blake2s only.
BLAKE2s-256 (32-byte hash size)
Available on crate feature blake3 only.
BLAKE3-256 (32-byte hash size)
Available on crate feature ripemd only.
RIPEMD-160 (20-byte hash size)
Available on crate feature ripemd only.
RIPEMD-256 (32-byte hash size)
Available on crate feature ripemd only.
RIPEMD-320 (40-byte hash size)
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Deserialize this value from the given Serde deserializer.
Read more Converts to this type from the input type.
Calculate the hash of some input data.
Create a multihash from an existing multihash digest.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Serialize this value into the given Serde serializer.
Read more The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.