Hi,

I am trying to encrypt a message using Libgcrypt library.
I have written the below code but I am getting an error when I try to declare objects of type 'gcry_cipher_hd_t' that 'Type gcry_cipher_hd_t could not be resolved' when it is defined in the gcrypt.h and I have included it.
I am in Ubuntu.
Thanks for any help.

My code
Code:
#include <gcrypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int main()
{
    gcry_cipher_hd_t hd;
    gcry_error_t error;
    char msg='Helloo world my first encryption';
    char pwd;
    int algo = 'GCRY_CIPHER_AES256';
    int mode = 'GCRY_CIPHER_MODE_CBC';
    unsigned int flags=0;
    printf('Enter Password');
    scanf("%c", &pwd);
    //GCRY_CIPHER_AES256
    error = gcry_cipher_open(*hd, algo, mode,flags);
}