Closed martinrotter closed 5 years ago
https://www.shellhacks.com/encrypt-decrypt-file-password-openssl/
It is easy to encrypt data with opensssl: echo "data" | openssl enc -aes-256-cbc -salt -k "password" and decrypt it: echo "encrypted data" | openssl enc -aes-256-cbc -salt -d -k "password".
echo "data" | openssl enc -aes-256-cbc -salt -k "password"
echo "encrypted data" | openssl enc -aes-256-cbc -salt -d -k "password"
Luckily, openssl returns non-zero return code if password is not correct.
Or we can use the library directly instead of calling external openssl executable.
openssl
https://wiki.openssl.org/index.php/EVP_Symmetric_Encryption_and_Decryption
I upgrade my Qt build to OpenSSL 1.1 branch.
https://www.shellhacks.com/encrypt-decrypt-file-password-openssl/
It is easy to encrypt data with opensssl:
echo "data" | openssl enc -aes-256-cbc -salt -k "password"
and decrypt it:echo "encrypted data" | openssl enc -aes-256-cbc -salt -d -k "password"
.Luckily, openssl returns non-zero return code if password is not correct.
Or we can use the library directly instead of calling external
openssl
executable.https://wiki.openssl.org/index.php/EVP_Symmetric_Encryption_and_Decryption