 *pPlainBuffer,
                     unsigned char **pCipherBuffer,
                     unsigned int nLength)
{
    unsigned int n, len, b;
    unsigned char *PT = NULL;
    unsigned char *CT = NULL;

    len = nLength;
    // If the length of input buffer is not a multiple of 8,
    // fill with 0x00 untill next multiple of 0
    while (len%8 &gt; 0)
        len++;

    PT = (unsigned char*)malloc(len);
    CT = (unsigned char*)malloc(len+sizeof(unsigned int));

    if ((PT != NULL) &amp;&amp; (CT != NULL