And there is a more elegant way, which is not very much different from what you do:
my $salt = pack "C10", map { int(256*rand()) } 0..9
If you want to stick to ASCII (2**70 is still a very large number), just change to constant to 128.
In reply to Re: Generating random characters for a salt.
by moritz
in thread Generating random characters for a salt.
by Cap'n Steve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |