mode.js 428 B

12345678910111213
  1. import { AES } from "./aes.js";
  2. export class ModeOfOperation {
  3. constructor(name, key, cls) {
  4. if (cls && !(this instanceof cls)) {
  5. throw new Error(`${name} must be instantiated with "new"`);
  6. }
  7. Object.defineProperties(this, {
  8. aes: { enumerable: true, value: new AES(key) },
  9. name: { enumerable: true, value: name }
  10. });
  11. }
  12. }
  13. //# sourceMappingURL=mode.js.map