openssl非对称加密rsa算法归类.pdfVIP

  • 7
  • 0
  • 约5.27千字
  • 约 6页
  • 2021-10-27 发布于福建
  • 举报
环境配置: 需要的环境 (1) OpenSSL 源码 (2 ) PERL for win32 (3 ) Vc++ 依赖项: libeay32.lib ,ssleay32.lib 用 openssl 命令制作生成密钥: 1、cd 跳转到 out32dll 目录下 2、输入生成私钥的命令: openssl genrsa -out private.pem 1024 3、输入生成对应公钥的命令: openssl rsa -in private.pem -pubout -out public.pem 4、运行代码 #include stdlib.h #include stdio.h #include string.h #include openssl/pem.h #include openssl/rsa.h /* int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa,int padding); int RSA_private_encrypt(in

文档评论(0)

1亿VIP精品文档

相关文档