As per the php 7.0 mcrypt_decrypt is deprecated.
I have following code.
$intSize= mcrypt_get_iv_size( MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB ); $strSize = mcrypt_create_iv( $intSize, MCRYPT_RAND ); $strText = ( true == $boolTrimText ) ? trim( $strText ) : $strText; $strResult = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, ( string ) $strKey, ( string ) $strText, MCRYPT_MODE_ECB, $strSize) ); Now we are getting
mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported Any alternative to fix this warning?