- Can someone give an encryption/decryption example with OpenSSL AES CCM?
- // Tell the alg we will encrypt Psize bytes
- int outl = 0;
- EVP_EncryptUpdate(ctx, 0, &outl, 0, Psize);
- // Add the AAD
- EVP_EncryptUpdate(ctx, 0, &outl, A, Asize);
- // Now we encrypt the data in P, placing the output in CT
- EVP_EncryptUpdate(ctx, CT, &outl, P, Psize);