in reply to Two-Way Password Encryption

You can use kerberos - the Network Authentication Protocol. There is a Perl interface to the Kerberos API - Authen::Krb5.
      
--------------------------------
SV* sv_bless(SV* sv, HV* stash);