mcrypt_enc_get_block_size(3) [php man page]
MCRYPT_ENC_GET_BLOCK_SIZE(3) 1 MCRYPT_ENC_GET_BLOCK_SIZE(3) mcrypt_enc_get_block_size - Returns the blocksize of the opened algorithm SYNOPSIS
int mcrypt_enc_get_block_size (resource $td) DESCRIPTION
Gets the blocksize of the opened algorithm. PARAMETERS
o $td - The encryption descriptor. RETURN VALUES
Returns the block size of the specified algorithm in bytes. PHP Documentation Group MCRYPT_ENC_GET_BLOCK_SIZE(3)
Check Out this Related Man Page
MCRYPT_GENERIC(3) 1 MCRYPT_GENERIC(3) mcrypt_generic - This function encrypts data SYNOPSIS
string mcrypt_generic (resource $td, string $data) DESCRIPTION
This 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, "