Si no mal recuerdo por ahi debe de estar la DLL.
la libreria se tiene que inicializar y posteiormente se usa sin problemas el ejemplo para cifrar es este.
int encrypt(char *buffer,char *pass,char *iv,int length) {
gcry_error_t err = 0;
gcry_cipher_hd_t aes_hd;
gcry_cipher_open(&aes_hd, GCRY_CIPHER_AES256,GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_SECURE);
err = gcry_cipher_setkey(aes_hd, pass, 32);
if (err) {
fprintf(stderr,"gcry_cipher_setkey(): could not set cipher key\n");
fclose(stderr);
exit(0);
}
err = gcry_cipher_setiv(aes_hd, iv, 16);
if (err) {
fprintf(stderr,"gcry_cipher_setiv(): could not set cipher initialization vector\n");
fclose(stderr);
exit(0);
}
err = gcry_cipher_encrypt(aes_hd, (unsigned char*) buffer, length, NULL, 0);
if (err) {
fprintf(stderr,"gcry_cipher_encrypt(): unable to encrypt file\n");
fclose(stderr);
exit(0);
}
err = gcry_cipher_reset(aes_hd);
gcry_cipher_close(aes_hd);
return err;
}
Ten en cuenta que hay varias formas de usar AES y tiene tambien distintos tamaños AES128 AES256
Ademas de especificar el tipo de bloque a usar.
He usando funciones similares en C# para windows poro no en C++.