For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
# generate keys | |
openssl req -new -x509 -newkey rsa:4096 -keyout private.pem -sigopt rsa_padding_mode:pss -sha256 -sigopt rsa_pss_saltlen:64 -out public.pem -nodes | |
# openssl can't read PEM format, convert the key | |
openssl rsa -in private.pem -pubout > public.rsa | |
# sign a file, save the signature | |
openssl dgst -sign private.pem file.txt > signature.txt | |
# verify the file using signature |
Note for me to remember how to set Android Home on Mac | |
Open Terminal and type in.. | |
nano ~/.bash_profile | |
Add the below paths | |
The path should be where your android installation is located | |
export ANDROID_HOME=/Users/username/Library/Android/sdk | |
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools | |
Save file and type in terminal... | |
source ~/.bash_profile |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh
file and put it into a directory where you want the files to be saved.cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.