pub fn sha256_crypt(
password: &[u8],
salt: &[u8],
params: &Sha256Params,
) -> Result<[u8; 32], CryptError>Expand description
The SHA256 crypt function returned as byte vector
If the provided hash is longer than defs::SALT_MAX_LEN character, it will be stripped down to defs::SALT_MAX_LEN characters.
§Arguments
password- The password to process as a byte vectorsalt- The salt value to use as a byte vectorparams- The Sha256Params to use WARNING: Make sure to compare this value in constant time!
§Returns
Ok(())if calculation was successfulErr(errors::CryptError)otherwise