生成一个1024位的密钥:
openssl genrsa -out test.key 1024
从这个密钥中分离出公钥:
openssl rsa -in test.key -pubout -out test_pub.key
对hello.txt进行加密:
openssl rsautl -encrypt -in hello.txt -inkey test_pub.key -pubin -out hello.en
对hello.en进行解密:
openssl rsautl -decrypt -in hello.en -inkey test.key -out hello.de