开发者

How to generate RSA-SHA256 digital signature with OpenSSL libraries?

开发者 https://www.devze.com 2023-01-02 09:36 出处:网络
I need to generate a digital signature from C++ code, using OpenSSL libraries. I understood that I need for that DSA \\ DSA_do_sign, but didn\'t understand how exactly to use it.

I need to generate a digital signature from C++ code, using OpenSSL libraries. I understood that I need for that DSA \ DSA_do_sign, but didn't understand how exactly to use it.

Does someone h开发者_运维百科ave an example for that, or a reference for better than OpenSSL's supplied docs?

Thanks in advance!


You seem to have RSA and DSA confused. However, if you want to sign using RSA-sha256, then use the EVP interface for signing. You can initialize with the EVP_SignInit_ex() method with EVP_sha256() for the type argument.

0

精彩评论

暂无评论...
验证码 换一张
取 消