Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 1x 12x 12x | import type { IDecryptionModeOfOperation, IEncryptionModeOfOperation, IModeOfOperation } from './IModeOfOperation';
export class ECBMode implements IModeOfOperation {
public readonly encryption = new ECBMode.ECBEncryptionMode();
public readonly decryption = new ECBMode.ECBDecryptionMode();
}
// istanbul ignore next
export namespace ECBMode {
export class ECBEncryptionMode implements IEncryptionModeOfOperation {
public start(): Uint8Array {
return new Uint8Array();
}
public combine(block: Uint8Array, encrypt: (block: Uint8Array) => Uint8Array): Uint8Array {
return encrypt(block);
}
public finish(): Uint8Array {
return new Uint8Array();
}
}
export class ECBDecryptionMode implements IDecryptionModeOfOperation {
public start(): Uint8Array {
return new Uint8Array();
}
public combine(block: Uint8Array, decrypt: (block: Uint8Array) => Uint8Array): Uint8Array {
return decrypt(block);
}
public finish(): Uint8Array {
return new Uint8Array();
}
}
}
|