mcrypt_encrypt Encrypts plaintext with given parameters &reftitle.description; stringmcrypt_encrypt stringcipher stringkey stringdata stringmode stringiv Encrypts the data and returns it. &reftitle.parameters; cipher &mcrypt.parameter.cipher; key The key with which the data will be encrypted. If it's smaller than the required keysize, it is padded with '\0'. It is better not to use ASCII strings for keys. It is recommended to use the mhash functions to create a key from a string. data The data that will be encrypted with the given cipher and mode. If the size of the data is not n * blocksize, the data will be padded with '\0'. The returned crypttext can be larger than the size of the data that was given by data. mode &mcrypt.parameter.mode; iv &mcrypt.parameter.iv; &reftitle.returnvalues; Returns the encrypted data, as a string. &reftitle.examples; <function>mcrypt_encrypt</function> Example ]]> &example.outputs; See also mcrypt_module_open for a more advanced API and an example.