#!/perl/bin/perl

# encrypt.pl
# First version. Takes a password from the command
# line, encrypts it, and prints it to the screen.

    $PassWordString = $ARGV[0];        # Get command line argument.

# Use crypt() with a "salt" of "" to encrypt the string
# that was entered.

    $EncryptedPassword = crypt ($PassWordString, "");

# Now print the encrypted version back to the screen.

    print "Encrypted password is $EncryptedPassword\n";

#                    End encrypt.pl
