Query: mcrypt_generic
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MCRYPT_GENERIC(3) 1 MCRYPT_GENERIC(3) mcrypt_generic - This function encrypts dataSYNOPSISstring mcrypt_generic (resource $td, string $data)DESCRIPTIONThis function encrypts data. The data is padded with " " 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 than the input, due to the padding of the data. If you want to store the encrypted data in a database make sure to store the entire string as returned by mcrypt_generic, or the string will not entirely decrypt properly. If your original string is 10 characters long and the block size is 8 (use mcrypt_enc_get_block_size(3) to determine the blocksize), you would need at least 16 characters in your database field. Note the string returned by mdecrypt_generic(3) will be 16 characters as well...use rtrim($str, "