Here is an idea, you can use some blowfish encryption algorithm?
In reply to Re^3: Encrypt in Perl and decrypt in JAVA by Anonymous Monk in thread Encrypt in Perl and decrypt in JAVA by ashok.g