#include <mhash.h>

#define CRYPTHASH "jfdskjgr8ds9fgurd8s9gjsdofigjsfdgj"

int qcrypt(char *password, unsigned char *results,int *sizeofresult)
{
       int keylen = strlen(CRYPTHASH);
       int passlen = strlen(password);
       MHASH td;
       unsigned char *mac;
       td = mhash_hmac_init(MHASH_MD5, CRYPTHASH, keylen, mhash_get_hash_pblock(
MHASH_MD5));
       mhash(td, password, keylen);
       mac = mhash_hmac_end(td);
       memcpy(results,mac,mhash_get_block_size(MHASH_MD5));
       *sizeofresult = mhash_get_block_size(MHASH_MD5);
}

