mcrypt_encrypt Encrypts plaintext with given parameters &warn.deprecated.function-7-1-0.removed-7-2-0; &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 the provided key size is not supported by the cipher, the function will emit a warning and return &false; 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.strict; &reftitle.returnvalues; Returns the encrypted data as a string &return.falseforfailure;. &reftitle.changelog; &Version; &Description; 5.6.0 Invalid key and iv sizes are no longer accepted. mcrypt_encrypt will now throw a warning and return &false; if the inputs are invalid. Previously keys and IVs were padded with '\0' bytes to the next valid size. &reftitle.examples; <function>mcrypt_encrypt</function> Example ]]> &example.outputs; &reftitle.seealso; mcrypt_decrypt mcrypt_module_open