Crypto Lib
    Preparing search index...

    Class ChunkDecryptor

    Decrypts a stream chunk by chunk as ciphertext arrives. A MESSAGE chunk is opened as soon as all of it is in; the FINAL chunk runs to the end of the stream, so ChunkDecryptor.finish opens it. At most one chunk is held at a time: a FINAL chunk longer than a chunk is refused.

    Given several keys, newest first, it opens the first chunk with each in turn and keeps the first that authenticates, so a stream written under an earlier key derivation still opens.

    Index
    • Adds ciphertext; returns the plaintext of the chunks it completes.

      Parameters

      • ciphertext: Uint8Array

      Returns Uint8Array<ArrayBufferLike>[]