Module pwhash::bsdi_crypt [] [src]

Enhanced DES-based hash.

This algorithm was developed by BSDi for BSD/OS as an extension of the traditional Unix crypt(3). It supports longer passwords, larger salt, and a variable number of rounds. Despite that, the algorithm is considered weak and is not recommended for new passwords.

Example

use pwhash::{bsdi_crypt, HashSetup};

assert_eq!(bsdi_crypt::hash_with(
        HashSetup { salt: Some("K0Ay"), rounds: Some(7250) },
        "password").unwrap(),
    "_Gl/.K0Ay.aosctsbJ1k");

Parameters

Hash Format

The format of the hash is _{rounds}{salt}{checksum}, where:

Constants

DEFAULT_ROUNDS

Default number of rounds.

SALT_LEN

Salt length.

Functions

hash [
Deprecated
]

Hash a password with a randomly generated salt and the default number of rounds.

hash_with [
Deprecated
]

Hash a password with user-provided parameters.

verify

Verify that the hash corresponds to a password.