crypt#

Synopsis#

my $hashed = crypt($plaintext, $salt);
if (crypt($input, $hashed) eq $hashed) { ... }  # verify

Description#

One-way password hashing using the system crypt(3) library.

Calls the system crypt(3) function. The SALT determines the hashing algorithm (DES, MD5, SHA-256, SHA-512, etc. depending on the platform). The result can be compared against a stored hash to verify a password without storing the plaintext.

See also#

Digest::SHA, Digest::MD5