Function crypt3::crypt

source ·
pub fn crypt<'a>(
    password: &'a [u8],
    salt: &'a [u8]
) -> Result<Vec<u8>, Box<dyn Error>>
Expand description

This function is the entry point of the crate. It accepts 2 byte slices - a to-be-hashed password and a salt. The first 3 bytes of the salt decide which algorithm is picked and should be in the $id$ form (e.g. $1$ for MD5).