Skip to content

Instantly share code, notes, and snippets.

@aimtiaz11
Last active December 12, 2018 12:33
Show Gist options
  • Save aimtiaz11/4a4d2e9d73ab6a50e3a1248515b0d589 to your computer and use it in GitHub Desktop.
Save aimtiaz11/4a4d2e9d73ab6a50e3a1248515b0d589 to your computer and use it in GitHub Desktop.
Jasypt Encryption & Decryption

Jayspt Encryption & Decryption

Add the following functions to your ~/.bash_profile:

Encrypt

encrypt(){
    /Users/ai/jasypt-1.9.2/bin/encrypt.sh \
    input="$1" \
    password="somesupersecretpassword" \
    stringOutputType="hex"
}

Decrypt

decrypt(){
    /Users/ai/jasypt-1.9.2/bin/decrypt.sh \
    input="$1" \
    password="somesupersecretpassword" \
    stringOutputType="hex"
}

Usage

encryt abc // output 8DD2F28E1A09C58E84D5935BCCFF3EED
decrypt 8DD2F28E1A09C58E84D5935BCCFF3EED // output abc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment