2

Can someone please give me an example of encryption and decryption using

#include <openssl/evp.h>

in c++ code: Aes 128 with cbc a key and an iv?

Thanks.

Mat
  • 202,337
  • 40
  • 393
  • 406
just me
  • 157
  • 1
  • 8
  • 18

1 Answers1

1

There are several answers on Stack Overflow, e.g. AES CTR 256 Encryption Mode of operation on OpenSSL

If you don't know what CBC and friends are all about, I would suggest either reading up on it, or using a wrapper library. OpenSSL is fairly low level, so if you don't know what you are doing, you will probably be not only more productive with a wrapper library, but also do things the correct way as well.

Community
  • 1
  • 1
csl
  • 10,937
  • 5
  • 57
  • 89
  • can you please wite a small code?:) I can't manage to give a good example. My key and iv are unsigned char and are fixed values. – just me May 20 '11 at 08:04
  • http://www.slideshare.net/guanzhi/crypto-with-openssl. what is outlen and out? can u fill the example? – just me May 20 '11 at 08:05