Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CTR

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.

Hierarchy

  • CTR

Index

Constructors

Methods

Constructors

constructor

  • new CTR(cipher: BlockCipher, iv: Uint8Array): CTR
  • Parameters

    • cipher: BlockCipher
    • iv: Uint8Array

    Returns CTR

Methods

clean

  • clean(): this

setCipher

  • setCipher(cipher: BlockCipher, iv: Uint8Array): this
  • Parameters

    • cipher: BlockCipher
    • iv: Uint8Array

    Returns this

stream

  • stream(dst: Uint8Array): void
  • Parameters

    • dst: Uint8Array

    Returns void

streamXOR

  • streamXOR(src: Uint8Array, dst: Uint8Array): void
  • Parameters

    • src: Uint8Array
    • dst: Uint8Array

    Returns void

Generated using TypeDoc