diff --git a/types/aes-js/aes-js-tests.ts b/types/aes-js/aes-js-tests.ts index 4f9d582630..9379fda89e 100644 --- a/types/aes-js/aes-js-tests.ts +++ b/types/aes-js/aes-js-tests.ts @@ -8,3 +8,6 @@ const ecb = new aesjs.ModeOfOperation.ecb(key); ecb.decrypt(ecb.encrypt(data)); const hex: string = aesjs.utils.hex.fromBytes(data); + +const ctr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter([])); +ctr.encrypt(data); diff --git a/types/aes-js/index.d.ts b/types/aes-js/index.d.ts index 142e03f7d9..e6bebdb9df 100644 --- a/types/aes-js/index.d.ts +++ b/types/aes-js/index.d.ts @@ -19,7 +19,7 @@ export class AES { * @param initialValue The Counter initial value. */ export class Counter { - constructor(initialValue: number) + constructor(initialValue: number | ByteSource) setValue(value: number): void; setBytes(bytes: ByteSource): void; increment(): void;