programming-examples/perl/String/Use the crypt() operator to store passwords in an unbreakable format.pl
2019-11-15 12:59:38 +01:00

13 lines
216 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
my $passwd = "password";
my $salt = join '',('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64];
$passwd = crypt($passwd, $salt);