我使用的是Linux命令行,我使用以下命令创建了一个私钥:
openssl genrsa -des3 -out private.pem 2048
我从私钥中提取了公钥,如下所示:
openssl rsa -in private.pem -out public.pem -outform PEM -pubout
我想使用公钥来加密一串文本,让我们说“foo bar”,然后再次解密这个字符串。
我该怎么做?
谢谢
我使用的是Linux命令行,我使用以下命令创建了一个私钥:
openssl genrsa -des3 -out private.pem 2048
我从私钥中提取了公钥,如下所示:
openssl rsa -in private.pem -out public.pem -outform PEM -pubout
我想使用公钥来加密一串文本,让我们说“foo bar”,然后再次解密这个字符串。
我该怎么做?
谢谢
我想你想要的
openssl rsautl -encrypt -inkey public.pem -pubin -in unencrypted_file.txt -out encrypted_file.ssl
更多信息请访问 迪威。
我想你想要的
openssl rsautl -encrypt -inkey public.pem -pubin -in unencrypted_file.txt -out encrypted_file.ssl
更多信息请访问 迪威。