![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||
mdecrypt_genericDescriptionstring mdecrypt_generic ( resource td, string data )This function decrypts data. Note that the length of the returned string can in fact be longer then the unencrypted string, due to the padding of the data.
The above example shows how to check if the data before the encryption is the same as the data after the decryption. It is very important to reinitialize the encryption buffer with mcrypt_generic_init() before you try to decrypt the data. The decryption handle should always be initialized with mcrypt_generic_init() with a key and an IV before calling this function. Where the encryption is done, you should free the encryption buffers by calling mcrypt_generic_deinit(). See mcrypt_module_open() for an example. See also mcrypt_generic(), mcrypt_generic_init(), and mcrypt_generic_deinit(). Copyright © 1997 - 2007 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of the Open Publication License is distributed with this manual, the latest version is presently available at http://www.opencontent.org/openpub/. Please see full copyright text at http://www.php.net/manual/en/copyright.php Original version of the above documentation is available at http://www.php.net/manual/en/ |
|