It is used to encrypt the password. Password to be encrypted is passed as agrument to this subroutine when called.
sub encrypt_pass {
my( $passwd) = @_;
$passwd = lc($passwd);
my $salt = substr $passwd, 0, 2;
my $encryptedpass = crypt($passwd, $salt);
return 1;
}

