pub struct Sha512 { /* private fields */ }
Expand description
SHA-512 wrapper, provided for convience.
Implementations
sourceimpl Sha512
impl Sha512
sourcepub fn compute_into_bytes<Input: Bytes + ?Sized, Output: MutByteArray<CRYPTO_HASH_SHA512_BYTES>>(
output: &mut Output,
input: &Input
)
pub fn compute_into_bytes<Input: Bytes + ?Sized, Output: MutByteArray<CRYPTO_HASH_SHA512_BYTES>>(
output: &mut Output,
input: &Input
)
One-time interface to compute SHA-512 digest for input
, copying result
into output
.
sourcepub fn compute<Input: Bytes + ?Sized, Output: NewByteArray<CRYPTO_HASH_SHA512_BYTES>>(
input: &Input
) -> Output
pub fn compute<Input: Bytes + ?Sized, Output: NewByteArray<CRYPTO_HASH_SHA512_BYTES>>(
input: &Input
) -> Output
One-time interface to compute SHA-512 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 Sha512::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 SHA-512 hash state with input
.
sourcepub fn finalize<Output: NewByteArray<CRYPTO_HASH_SHA512_BYTES>>(self) -> Output
pub fn finalize<Output: NewByteArray<CRYPTO_HASH_SHA512_BYTES>>(self) -> Output
Consumes hasher and return final computed hash.
sourcepub fn finalize_into_bytes<Output: MutByteArray<CRYPTO_HASH_SHA512_BYTES>>(
self,
output: &mut Output
)
pub fn finalize_into_bytes<Output: MutByteArray<CRYPTO_HASH_SHA512_BYTES>>(
self,
output: &mut Output
)
Consumes hasher and writes final computed hash into output
.
sourcepub fn finalize_to_vec(self) -> Vec<u8>
pub fn finalize_to_vec(self) -> Vec<u8>
Consumes hasher and returns final computed hash as a Vec
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sha512
impl Send for Sha512
impl Sync for Sha512
impl Unpin for Sha512
impl UnwindSafe for Sha512
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more