code: function _createCipher(options) {
    options = options || {};
    var mode = (options.mode || 'CBC').toUpperCase();
    var algorithm = 'AES-' + mode;
  
    var cipher;
    if(options.decrypt) {
      cipher = forge.cipher.createDecipher(algorithm, options.key);
    } else {
      cipher = forge.cipher.createCipher(algorithm, options.key);
    }
  
    // backwards compatible start API
    var start = cipher.start;
    cipher.start = function(iv, options) {
      // backwards compatibility: support second arg as output buffer
      var output = null;
      if(options instanceof forge.util.ByteBuffer) {
        output = options;
        options = {};
      }
      options = options || {};
      options.output = output;
      options.iv = iv;
      start.call(cipher, options);
    };
  
    return cipher;
  }
docs: Deprecated. Instead, use:
  
  forge.cipher.createCipher('AES-<mode>', key);
  forge.cipher.createDecipher('AES-<mode>', key);
  
  Creates a deprecated AES cipher object. This object's mode will default to
  CBC (cipher-block-chaining).
  
  The key and iv may be given as a string of bytes, an array of bytes, a
  byte buffer, or an array of 32-bit words.
  
  @param options the options to use.
  key the symmetric key to use.
  output the buffer to write to.
  decrypt true for decryption, false for encryption.
  mode the cipher mode to use (default: 'CBC').
  
  @return the cipher.