title: Encrypting gives error for invalid key size
body: <p>I am creating a random key, then i want to encrypt it using a good algorithm, then I want to encrypt the data with this encrypted key. My code is:</p>
  
  <pre><code>$iv=16; //128bits
  $datakey = base64_encode(openssl_random_pseudo_bytes($iv,$strong));
  $datakey = md5($datakey);
  $finaldata= mcrypt_encrypt(MCRYPT_BLOWFISH, $datakey, $stringtobeencoded, MCRYPT_MODE_CFB);
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Encryption mode requires an initialization vector of size 8</p>
  </blockquote>
  
  <p>How to accomplish my requirement?</p>