Function sha_crypt::sha256_simple

source ·
pub fn sha256_simple(
    password: &str,
    params: &Sha256Params
) -> Result<String, CryptError>
Available on crate feature simple only.
Expand description

Simple interface for generating a SHA256 password hash.

The salt will be chosen randomly. The output format will conform to 1.

$<ID>$<SALT>$<HASH>

Returns

  • Ok(String) containing the full SHA256 password hash format on success
  • Err(CryptError) if something went wrong.