Created
April 10, 2021 05:12
-
-
Save sat0yu/208bddb5aec1663bcfb465b474d7d3c9 to your computer and use it in GitHub Desktop.
Openssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -e: encryption, -base64 (-a): use base64 encoding/decoding, -pass: `pass:xxx` sets the password `xxx` to encrypt/decrypt, -p: print salt, key, IV | |
echo "hello" | openssl enc -aes-128-cbc -e -base64 -pass pass:test -p | |
# salt=FE03CBE926FC4070 | |
# key=FFF339A34C98ED8D8B8843E3F1846104 | |
# iv =EAEAD799A571F360BA1C17B335E2701F | |
# U2FsdGVkX1/+A8vpJvxAcFEj7ilI/zfrmA3EZ5VQUeY= | |
# -d: decryption | |
echo "U2FsdGVkX1/+A8vpJvxAcFEj7ilI/zfrmA3EZ5VQUeY=" | openssl enc -aes-128-cbc -d -base64 -pass pass:test -p | |
# salt=FE03CBE926FC4070 | |
# key=FFF339A34C98ED8D8B8843E3F1846104 | |
# iv =EAEAD799A571F360BA1C17B335E2701F | |
# hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment