                   CT[n-n%8+b] ^= (1 &lt;&lt; n%8);
                }
            }
        }
        *(unsigned int*)(CT+len) = nLength;
        *pCipherBuffer = CT;

        // *pCipherBuffer must be freed by the caller
        free(PT);
        return len+sizeof(unsigned int);
    }
    if (PT)
        free(PT);
    if (CT)
        free(CT);
    return 0;
}

</pre>
<H3>Encrypted Text:</H3>
<pre>7B 4E 94 66 EA 77 70 B0 2B 22 31 EF 19 75 F1 F2  &#123;&#78;&#246;&#102;&#219;&#119;&#112;&#166;&#32;&#34;&#49;