Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
writeSequenceHeaderFunc: (buffer: Buffer) => {
// assert(buffer.length === this.sequenceHeaderSize);
this.writeSequenceHeader(buffer);
},
// ---------------------------------------- Signing stuff
signBufferFunc: options.signBufferFunc,
signatureLength: options.signatureLength,
// ---------------------------------------- Encrypting stuff
cipherBlockSize: options.cipherBlockSize,
encryptBufferFunc: options.encryptBufferFunc,
plainBlockSize: options.plainBlockSize,
};
this.chunkManager = new ChunkManager(params);
this.chunkManager.on("chunk", (chunk: Buffer, isLast: boolean) => {
/**
* @event chunk
*/
this.emit("chunk", chunk, isLast || this.aborted);
});
}
writeSequenceHeaderFunc: function(block) {
assert(block.length === this.sequenceHeaderSize);
self.writeSequenceHeader(block);
},
// ---------------------------------------- Signing stuff
signatureLength: options.signatureLength,
compute_signature: options.signingFunc,
// ---------------------------------------- Encrypting stuff
plainBlockSize: options.plainBlockSize,
cipherBlockSize: options.cipherBlockSize,
encrypt_buffer: options.encrypt_buffer
};
self.chunkManager = new ChunkManager(params);
self.chunkManager.on("chunk", function(chunk, is_last) {
/**
* @event chunk
* @param chunk {Buffer}
*/
self.emit("chunk", chunk, is_last || self.aborted);
});
};
util.inherits(SecureMessageChunkManager, EventEmitter);