pub struct Sha3256 { /* private fields */ }Expand description
SHA3-256 wrapper, provided for convenience.
Implementations§
Source§impl Sha3256
impl Sha3256
Sourcepub fn compute_into_bytes<Input: Bytes + ?Sized, Output: MutByteArray<CRYPTO_HASH_SHA3256_BYTES>>(
output: &mut Output,
input: &Input,
)
pub fn compute_into_bytes<Input: Bytes + ?Sized, Output: MutByteArray<CRYPTO_HASH_SHA3256_BYTES>>( output: &mut Output, input: &Input, )
One-time interface to compute SHA3-256 digest for input, copying
result into output.
Sourcepub fn compute<Input: Bytes + ?Sized, Output: NewByteArray<CRYPTO_HASH_SHA3256_BYTES>>(
input: &Input,
) -> Output
pub fn compute<Input: Bytes + ?Sized, Output: NewByteArray<CRYPTO_HASH_SHA3256_BYTES>>( input: &Input, ) -> Output
One-time interface to compute SHA3-256 digest for input.
Sourcepub fn compute_to_vec<Input: Bytes + ?Sized>(input: &Input) -> Vec<u8> ⓘ
pub fn compute_to_vec<Input: Bytes + ?Sized>(input: &Input) -> Vec<u8> ⓘ
Wrapper around Sha3256::compute, returning a Vec. Provided for
convenience.
Sourcepub fn update<Input: Bytes + ?Sized>(&mut self, input: &Input)
pub fn update<Input: Bytes + ?Sized>(&mut self, input: &Input)
Updates SHA3-256 hash state with input.
Sourcepub fn finalize<Output: NewByteArray<CRYPTO_HASH_SHA3256_BYTES>>(self) -> Output
pub fn finalize<Output: NewByteArray<CRYPTO_HASH_SHA3256_BYTES>>(self) -> Output
Consumes hasher and return final computed hash.
Sourcepub fn finalize_into_bytes<Output: MutByteArray<CRYPTO_HASH_SHA3256_BYTES>>(
self,
output: &mut Output,
)
pub fn finalize_into_bytes<Output: MutByteArray<CRYPTO_HASH_SHA3256_BYTES>>( self, output: &mut Output, )
Consumes hasher and writes final computed hash into output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sha3256
impl RefUnwindSafe for Sha3256
impl Send for Sha3256
impl Sync for Sha3256
impl Unpin for Sha3256
impl UnsafeUnpin for Sha3256
impl UnwindSafe for Sha3256
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