pub struct Sha512;Expand description
SHA-512 hash function (64-byte output, FIPS 180-4 §6.4).
Implementations§
Source§impl Sha512
impl Sha512
Sourcepub const DIGEST_LEN: usize = 64
pub const DIGEST_LEN: usize = 64
Byte length of the SHA-512 digest output.
Sourcepub const OUTPUT_LEN: usize = 64
pub const OUTPUT_LEN: usize = 64
Output length in bytes (alias for DIGEST_LEN; use for generic const contexts).
Sourcepub const BLOCK_SIZE: usize = 128
pub const BLOCK_SIZE: usize = 128
SHA-512 block size in bytes (FIPS 180-4).
Source§impl Sha512
impl Sha512
Sourcepub fn hash_fixed(&self, msg: &[u8]) -> [u8; 64]
pub fn hash_fixed(&self, msg: &[u8]) -> [u8; 64]
Hash msg and return the 64-byte SHA-512 digest as a fixed-size array.
Alloc-free alternative to Hash::hash_to_vec.
Trait Implementations§
impl Copy for Sha512
Source§impl Hash for Sha512
impl Hash for Sha512
Auto Trait Implementations§
impl Freeze for Sha512
impl RefUnwindSafe for Sha512
impl Send for Sha512
impl Sync for Sha512
impl Unpin for Sha512
impl UnsafeUnpin for Sha512
impl UnwindSafe for Sha512
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