# First encode $f2 into $f1 Encode data my $cipher = new Crypt::Blowfish $model_passphrase; # Pad $f1 to the next 8 byte boundary if((length($f2) % 8) != 0) { $f2 .= "\x00" x (8 - (length($f2) % 8)); } for(my $i=0;8*$iencrypt(substr($f2,8*$i,8)); } # Since we have to work on Windows don't forget # the binmode() on the file handle # Now to decode $f1 into $f2 if((length($f1) % 8) != 0) { $f1 .= "\x00" x (8 - (length($f1) % 8)); } my $cipher = new Crypt::Blowfish $model_passphrase; for(my $i=0;(8*$i)decrypt(substr($f1,8*$i,8)); } $f2 =~ s/\x00+$//s;