The encryption handle should alwayws be initialized with mcrypt_generic_init() with a key and an IV before calling this function.
This function encrypts data. The data is padded with "\0" to make sure the length of the data is n * blocksize. This function returns the encrypted data. Note that the length of the returned string can in fact be longer then the input, due to the padding of the data.