Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #encrypt text
- echo "this is a test"|openssl aes-256-cbc -salt -pbkdf2
- echo "this is a test"|openssl aes-256-cbc -salt -pbkdf2 -out output_01.enc
- echo "this is a test"|openssl aes-256-cbc -salt -pbkdf2 > output_02.enc
- #decrypt text
- openssl aes-256-cbc -d -salt -pbkdf2 -in output_01.enc
- #encypt files
- #create test files
- echo -e "this is a test\nand this is some text\nand a 3rd line for testing" > file.txt
- wget "https://filmsbykris.com/v7/img/tux.png"
- openssl aes-256-cbc -salt -pbkdf2 -in file.txt -out file.enc
- openssl aes-256-cbc -salt -pbkdf2 -in tux.png -out tux.enc
- #decrypt
- openssl aes-256-cbc -d -salt -pbkdf2 -in file.enc
- openssl aes-256-cbc -d -salt -pbkdf2 -in file.enc -out file_01.txt
- cat file_01.txt
- #encrypt tar.gz file/directory
- tar -cz * |openssl aes-256-cbc -salt -pbkdf2 -out backup.tar.gz.enc
- #decrypt tar.gz
- #create dir to extract to
- mkdir backup
- openssl aes-256-cbc -d -salt -pbkdf2 -in backup.tar.gz.enc| tar xz -C backup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement