Cara mengenkripsi dan mendekripsi file teks menggunakan kunci publik dan pribadi OpenSSL RSA

openssl rsautl -encrypt -pubin -inkey public_key.pem -in secret.txt -out secret.enc
#where "secret.txt" is the original file and "secret.enc" is the encrypted file.

# To decrypt
openssl rsautl -decrypt -inkey private_key.pem -in secret.enc
Chris Nzoka-okoye