code: function(plaintext, key, iv, encoding) {
        var base64, blocks, ciphertext;
        if (encoding == null) {
          encoding = "buffer";
        }
        key = this.toBuffer(key);
        iv = this.toBuffer(iv);
        blocks = Gibberish.rawEncrypt(plaintext, key, iv);
        base64 = Gibberish.Base64.encode(blocks, false);
        if (encoding === 'base64') {
          return base64;
        }
        ciphertext = Gibberish.Base64.decode(base64);
        if (encoding === 'hex') {
          return Gibberish.a2h(ciphertext);
        }
        if (encoding === 'buffer') {
          return ciphertext;
        } else {
          throw new Error("Encoding not supported");
        }
      }
docs: Encipher data
  @param {Buffer} plaintext The data to encrypt.
  @param {String|Buffer} key The key to encrypt with. Can be a Buffer or hex encoded string.
  @param {String|Buffer} iv The IV. Can be a Buffer or hex encoded string.
  @param {string} [encoding=buffer] The format to return the encrypted data at.
  @return {String} The encrypted data.