Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在使用 i2d_RSAPublicKey 提取后打印存储在 const unsigned char * 中的公钥?
你的问题相当广泛。但是,假设公钥是 的数组unsigned char,您需要将每个字符(每个字节)转换为可读的内容,例如十六进制或 base-64 编码。
unsigned char
像以十六进制打印整个密钥这样简单的事情可能会起作用:
for (int i = 0; i < pubkey_len; i++) printf("%02X", pubkey[i]);