in reply to Generating random characters for a salt.
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.
|
|---|