title: Alternative to mcrypt_encrypt?
body: <p>As per the php 7.0 mcrypt_decrypt is deprecated.</p>
  
  <p>I have following code.</p>
  
  <pre><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) );
  </code></pre>
  
  <p>Now we are getting </p>
  
  <pre><code>mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported
  </code></pre>
  
  <p>Any alternative to fix this warning?</p>