Constructors
constructor
- new CTR(cipher: BlockCipher, iv: Uint8Array): CTR
Parameters
cipher: BlockCipher
iv: Uint8Array
Returns CTR
Methods
setCipher
- setCipher(cipher: BlockCipher, iv: Uint8Array): CTR
Parameters
cipher: BlockCipher
iv: Uint8Array
Returns CTR
stream
- stream(dst: Uint8Array): void
streamXOR
- streamXOR(src: Uint8Array, dst: Uint8Array): void
Parameters
src: Uint8Array
dst: Uint8Array
Returns void
CTR implements counter cipher mode.
Note that CTR mode is malleable and generally should not be used without authentication. Instead, use an authenticated encryption mode, such as GCM.