Linux File Encryption With GPG On Linux

View previous topic View next topic Go down

Linux File Encryption With GPG On Linux

Post by jamied_uk on 31st July 2016, 21:57



Install for older Mint versions, earlier than Mint 18.1, after Mint 17 it is built in and wont need installing!

Code:
sudo apt-get install -y gpg


File Enc
Code:
#!/bin/bash
# Usage: ./Enc.sh
echo "Welcome, I am ready to encrypt a file/folder for you"
echo "currently I have a limitation, Place me to thh same folder, where a file to be
encrypted is present"
echo "Enter the Exact File Name with extension"
read file;
gpg -c $file # -e
echo "I have encrypted the file successfully..."
echo "Now I will be removing the original file"
rm -rf $file


File Dec
Code:
#!/bin/bash
# Usage: ./Dec.sh
echo "Welcome, I am ready to encrypt a file/folder for you"
echo "currently I have a limitation, Place me to thh same folder, where a file to be
encrypted is present"
echo "Enter the Exact File Name with extension"
read file;
gpg --output revealed --decrypt $file
echo "I have Decrypted the file successfully..."
# rm -rf $file
file revealed





More about gpg Encryption
gnupg.org/gph/en/manual/x110.html
avatar
jamied_uk
Admin

Posts : 2191
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum