#[non_exhaustive]
pub enum HashInput {
    Entry(Entry),
    Action(Action),
    Blake2B(Vec<u8, Global>, u8),
    Sha256(Vec<u8, Global>),
    Sha512(Vec<u8, Global>),
    Keccak256(Vec<u8, Global>),
    Sha3256(Vec<u8, Global>),
}
Expand description

Input to holochain hash function.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Entry(Entry)

Hash an Entry.

Action(Action)

Hash an action.

Blake2B(Vec<u8, Global>, u8)

Blake2b is the native Holochain hashing algorithm and compatible with e.g. Polkadot and Zcash. Second value is the output length of the hash in bytes.

Sha256(Vec<u8, Global>)

256 bit SHA-2 a.k.a. SHA-256 used by Bitcoin, IPFS, etc.

Sha512(Vec<u8, Global>)

512 bit SHA-2 a.k.a. SHA-512.

Keccak256(Vec<u8, Global>)

Keccak256 is the variant of SHA3 used by the Ethereum Virtual Machine. It is slightly different to the NIST standard SHA3-256. (i.e. the resulting hashes are completely different)

Sha3256(Vec<u8, Global>)

NIST standard SHA3-256.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type for metadata in pointers and references to Self.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more