Use OpenSSL for encryption if installed
martinrotter opened this issue · 1 comments
martinrotter commented
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
martinrotter commented
I upgrade my Qt build to OpenSSL 1.1 branch.