pub struct Sha1;Implementations§
source§impl Sha1
 
impl Sha1
const H0: u32 = 1_732_584_193u32
const H1: u32 = 4_023_233_417u32
const H2: u32 = 2_562_383_102u32
const H3: u32 = 271_733_878u32
const H4: u32 = 3_285_377_520u32
sourcepub fn hash(key: &[u8]) -> [u8; 20]
 
pub fn hash(key: &[u8]) -> [u8; 20]
Computes the SHA-1 hash of the input string by taking in either a String of str type.
sourcefn pad_message(input: &[u8]) -> Vec<u8>
 
fn pad_message(input: &[u8]) -> Vec<u8>
Pads the input message according to SHA-1 specifications.
sourcefn build_schedule(chunk: &[u8]) -> [u32; 80]
 
fn build_schedule(chunk: &[u8]) -> [u32; 80]
Builds the message schedule array from a 512-bit chunk.
Trait Implementations§
source§impl PartialEq for Sha1
 
impl PartialEq for Sha1
impl Copy for Sha1
impl StructuralPartialEq for Sha1
Auto Trait Implementations§
impl Freeze for Sha1
impl RefUnwindSafe for Sha1
impl Send for Sha1
impl Sync for Sha1
impl Unpin for Sha1
impl UnwindSafe for Sha1
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
§impl<T, U> FromLossy<T> for Uwhere
    U: From<T>,
 
impl<T, U> FromLossy<T> for Uwhere
    U: From<T>,
§fn from_lossy(t: T) -> U
 
fn from_lossy(t: T) -> U
Convert to this type lossily
source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T, U> IntoLossy<T> for Uwhere
    T: FromLossy<U>,
 
impl<T, U> IntoLossy<T> for Uwhere
    T: FromLossy<U>,
§fn into_lossy(self) -> T
 
fn into_lossy(self) -> T
Convert this type lossily