Crypt::UnixCrypt_XS is a perl xs interface for a portable traditional crypt function.
use Crypt::UnixCrypt_XS qw/crypt/;
my $hashed = crypt( $password, $salt );
use Crypt::UnixCrypt_XS qw/crypt_rounds fold_password
$block = crypt_rounds( $password, $nrounds, $saltnum, $block );
$password = fold_password( $password );
$block = base64_to_block( $base64 );
$base64 = block_to_base64( $block );
$saltnum = base64_to_int24( $base64 );
$base64 = int24_to_base64( $saltnum );
$saltnum = base64_to_int12( $base64 );
$base64 = int12_to_base64( $saltnum );
This module implements the DES-based Unix crypt function. For those who need to construct non-standard variants of crypt, the various building blocks used in crypt are also supplied separately.