"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const modeOfb$1 = require("../../_virtual/mode-ofb.js");
const core = require("./core.js");
const cipherCore = require("./cipher-core.js");
var modeOfb = modeOfb$1.__module.exports;
var hasRequiredModeOfb;
function requireModeOfb() {
  if (hasRequiredModeOfb) return modeOfb$1.__module.exports;
  hasRequiredModeOfb = 1;
  (function(module2, exports2) {
    (function(root, factory, undef) {
      {
        module2.exports = factory(core.__require(), cipherCore.__require());
      }
    })(modeOfb, function(CryptoJS) {
      CryptoJS.mode.OFB = function() {
        var OFB = CryptoJS.lib.BlockCipherMode.extend();
        var Encryptor = OFB.Encryptor = OFB.extend({
          processBlock: function(words, offset) {
            var cipher = this._cipher;
            var blockSize = cipher.blockSize;
            var iv = this._iv;
            var keystream = this._keystream;
            if (iv) {
              keystream = this._keystream = iv.slice(0);
              this._iv = void 0;
            }
            cipher.encryptBlock(keystream, 0);
            for (var i = 0; i < blockSize; i++) {
              words[offset + i] ^= keystream[i];
            }
          }
        });
        OFB.Decryptor = Encryptor;
        return OFB;
      }();
      return CryptoJS.mode.OFB;
    });
  })(modeOfb$1.__module);
  return modeOfb$1.__module.exports;
}
exports.__require = requireModeOfb;
