Quick & Easy Old Usful Encrypt & Decrypt Methods for linux

Go down

Quick & Easy Old Usful Encrypt & Decrypt Methods for linux Empty Quick & Easy Old Usful Encrypt & Decrypt Methods for linux

Post by jamied_uk on 28th May 2018, 15:09



load files as described after making them executable

Code:
sudo chmod +x *.sh




Code:
#!/bin/bash
#
#
#
# Usage: ./quick_enc_function.sh file.ext
#
#
#
myvar="$1"
#
#
encrypt(){
    gpg -c -o- $1 # encrypts data to stdout

}

encrypt "$myvar" > private.dat


Decryption


Code:
#!/bin/bash
#
# Usage: ./quick_dec_function.sh private.dat
#
#
#
myvar="$1"
gpg "$1" > errors.txt
jamied_uk
jamied_uk
Admin

Posts : 2472
Join date : 2010-05-09
Age : 36
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top


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