in reply to Decrypt and encrypt CVS password in .cvspass
can be better written as:my $s = "A$str"; for (my $i = 1; $i < length($s) ; $i++) { substr($s, $i, 1, chr($shifts[ord(substr($s, $i, 1))])); }
my $s = "A" . pack "C*", map $shifts[$_], unpack "C*", $str;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Decrypt and encrypt CVS password in .cvspass
by bsdz (Friar) on May 18, 2005 at 07:20 UTC |