fn hash_secret(secret: &str) -> GenericArray<u8, U32> {
    // Create a SHA3-256 digest
    let mut hasher = Sha3_256::new();
    // Write password's bytes into hasher
    hasher.update(secret.as_bytes());
    // Return SHA3-256 32-byte secret hash
    hasher.finalize()
}
// Generates a 32-byte hash of a provided secret.
Generates a 32-byte hash of a provided secret.
Generates a 32 - byte hash of a provided secret .
fn hash_secret(secret: &str) -> GenericArray<u8, U32> {
    // Create a SHA3-256 digest
    let mut hasher = Sha3_256::new();
    // Write password's bytes into hasher
    hasher.update(secret.as_bytes());
    // Return SHA3-256 32-byte secret hash
    hasher.finalize()
}
fn hash_secret ( secret : & str ) -> GenericArray < u8 , U32 > { // Create a SHA3-256 digest let mut hasher = Sha3_256 :: new ( ) ; // Write password's bytes into hasher hasher . update ( secret . as_bytes ( ) ) ; // Return SHA3-256 32-byte secret hash hasher . finalize ( ) }
Generates a 32-byte hash of a provided secret.
Generates a 32 - byte hash of a provided secret .
secret
&str
secret
&str