in reply to Decrypt and encrypt CVS password in .cvspass

This is definitely Perl spoken with a C accent. One quick perl-ish upgrade:
my $s = "A$str"; for (my $i = 1; $i < length($s) ; $i++) { substr($s, $i, 1, chr($shifts[ord(substr($s, $i, 1))])); }
can be better written as:
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
    That's better, never thought of it at the time, thanks :-)