mcrypt_get_key_size

PHP 4, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0
mcrypt_get_key_size - Gets the key size of the specified cipher
Manual
Code Examples

mcrypt_get_key_size( int$cipher ): int|false
intfalsemcrypt_get_key_size stringcipher stringmode

Parameters

cipher

One of the MCRYPT_ciphername constants, or the name of the algorithm as string.

mode

One of the MCRYPT_MODE_modename constants, or one of the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".

Return Values

Returns the maximum supported key size of the algorithm in bytes or false on failure.

Related Functions

Example of mcrypt_get_key_size

Show all examples for mcrypt_get_key_size

PHP Version: