APIs

Show:

Constructor

ChunkManager

(
  • options
)

Parameters:

  • options Object
    • chunkSize Number
    • [headerSize= 0] Number optional
    • [signatureLength= 0] Number optional
    • [sequenceHeaderSize= 8] Number optional

      size of the sequence header

    • [cipherBlockSize=0] Number optional
    • [plainBlockSize=0] Number optional
    • [compute_signature=null] Function optional
    • [encrypt_buffer] Function optional
    • [writeSequenceHeaderFunc=null] Function optional
    • [writeHeaderFunc] Function optional

Methods

_write_signature

() private

compute the signature of the chunk and append it at the end of the data block.

makeBuffer turn a string make of hexadecimal bytes into a buffer

(
  • listOfBytes
)
Buffer

Parameters:

  • listOfBytes Object

Returns:

Buffer:

Example:

const buffer = makeBuffer("BE EF");

write

(
  • buffer
  • length
)

Parameters:

  • buffer Buffer
  • length Number

Events

chunk

Event Payload:

  • chunk Buffer
  • isLast Boolean

    , true if final chunk