#[non_exhaustive]pub enum HashInput {
Entry(Entry),
Action(Action),
Blake2B(Vec<u8>, u8),
Sha256(Vec<u8>),
Sha512(Vec<u8>),
Keccak256(Vec<u8>),
Sha3256(Vec<u8>),
}
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>, 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>)
256 bit SHA-2 a.k.a. SHA-256 used by Bitcoin, IPFS, etc.
Sha512(Vec<u8>)
512 bit SHA-2 a.k.a. SHA-512.
Keccak256(Vec<u8>)
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>)
NIST standard SHA3-256.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HashInput
impl<'de> Deserialize<'de> for HashInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HashInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HashInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for HashInput
impl Serialize for HashInput
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for HashInput
impl StructuralPartialEq for HashInput
Auto Trait Implementations§
impl Freeze for HashInput
impl RefUnwindSafe for HashInput
impl Send for HashInput
impl Sync for HashInput
impl Unpin for HashInput
impl UnwindSafe for HashInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.