使用 C,我可以使用 生成 RSA 公钥并将其写入 PEM 文件PEM_write_RSAPublicKey()
,
但我想将多个公钥写入单个文件(如 known_hosts 或 authorized_hosts),而不是拥有separate PEM file for each
.
我知道怎么encode/decode base64
做
但我如何得到public key from the RSA structure (which I can base64 encode) and later read the same key from file and put it back into the RSA structure for encrypting/decrypting
?