Skip to content

Quick helper script to encrypt files using OpenSSL

License

Notifications You must be signed in to change notification settings

samerziade/openssl-encrypt-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

File Encrypt/Decrypt

This tool can be handy to quickly encrypt and decrypt files using OpenSSL.

Options

Name Description Default
KEY_FILE The file name for the enc/dec key secret.pem
KEY_LEN Length of the key generated 8192
FILE The file which will be encrypted none

Creating Keys

Create a key with default values:

make key 

Create a key with a sepecified length and file name:

make key KEY_FILE=custom.pem KEY_LEN=1024

Encrypting Files

Once you've generated the key, you may encrypt a file. The generated filename will be the same as the input file name with .enc appended to it.

make encrypt FILE=secret.txt

Decrypting Files

To decrypt a file, pass in the filename without the .enc extension.

make decrypt FILE=secret.txt

About

Quick helper script to encrypt files using OpenSSL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published