Can you help me get my head around openssl public key encryption with rsa.h in c++?

后端 未结 4 524
青春惊慌失措
青春惊慌失措 2021-01-02 07:20

I am trying to get my head around public key encryption using the openssl implementation of rsa in C++. Can you help? So far these are my thoughts (please do correct if nece

4条回答
  •  长情又很酷
    2021-01-02 07:42

    I write two examples around CAF's code. They are heavily modifed and uses OpenSSL's BIO container for more abstraction.

    One example uses a file as input and the other example uses a string buffer. It uses RSA and DES, however you can easily change it from the code. Compile instructions are inside the code. I needed a working example, I hope someone find this useful. I also commented the code. You can get it from here:

    Take file as input: https://github.com/farslan/snippets/blob/master/hybrid_file.c

    Take string buffer as input: https://github.com/farslan/snippets/blob/master/hybrid_data.c

提交回复
热议问题