A simple example of usage of the crypt function
Note that multiple invocations will (usually) produce different encrypted forms for the same password.
#!/usr/bin/perl -w $password = $ARGV[0]; srand(time|$$); $random = "abcdefghijklmnopqrstuvwxyz1234567890"; for (1..2) { $salt .= substr($random,int(rand(36)),1); } $field = crypt ($password, $salt); print $field;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: crypted form
by ZZamboni (Curate) on Apr 27, 2000 at 17:36 UTC |