Archive for the tag 'mcrypt'

SBDavid

How to encrypt file with passphrase

How to encrypt file with passphrase

Mcrypt is a simple crypting program, a replacement for the old unix crypt(1). When encrypting or ecrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification date of the original. The original file may be deleted by specifying the -u parameter. If no files are specified, the standard input is encrypted to the standard output.

$ mcrypt -uz file1

Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:
File file1 was encrypted.

-d, –decrypt decrypts.
-z, –gzip Use gzip to compress files before encryption.
-u, –unlink Unlink the input file after encryption or decryption.