The last obfuscation w.r.t. fft got me inspired, so I spent some of my CPU time to do this:
print join (' ', map { srand ($_->[0]); my $l; for (1..$_->[1]) { $l = ''; $l .= chr (int (rand (58))+65) for 1..6; } substr ($l, 0, $_->[0] < 1024 ? 4 : 6) } [346, 5305], [59235, 9374], [512, 2698], [104315, 5127]), "\n";
I hope it works everywhere, as I'm not sure whether srand&rand have the same algo everywhere.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: srand & rand to encode strings
by moritz (Cardinal) on Apr 18, 2008 at 14:19 UTC | |
by elmex (Friar) on Apr 18, 2008 at 14:21 UTC | |
by awwaiid (Friar) on Aug 22, 2008 at 14:28 UTC |