mode.js 590 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.ModeOfOperation = void 0;
  4. const aes_js_1 = require("./aes.js");
  5. class ModeOfOperation {
  6. constructor(name, key, cls) {
  7. if (cls && !(this instanceof cls)) {
  8. throw new Error(`${name} must be instantiated with "new"`);
  9. }
  10. Object.defineProperties(this, {
  11. aes: { enumerable: true, value: new aes_js_1.AES(key) },
  12. name: { enumerable: true, value: name }
  13. });
  14. }
  15. }
  16. exports.ModeOfOperation = ModeOfOperation;
  17. //# sourceMappingURL=mode.js.map