title: Getting error of Invalid IV Length while using aes-256-cbc for encryption in node
body: <p>Code Sample is as follows: </p>
  
  <pre><code>  var crypto = require('crypto');
    var key = 'ExchangePasswordPasswordExchange';
    var  plaintext = '150.01';
    var iv = new Buffer(crypto.randomBytes(16))
    ivstring = iv.toString('hex');
  
  
    var cipher = crypto.createCipheriv('aes-256-cbc', key, ivstring)
    var  decipher = crypto.createDecipheriv('aes-256-cbc', key,ivstring);
  
    cipher.update(plaintext, 'utf8', 'base64');
    var encryptedPassword = cipher.final('base64');
  </code></pre>
  
  <p>Getting error of invalid IV length.</p>