How to use the node-opcua-chunkmanager.ChunkManager function in node-opcua-chunkmanager

To help you get started, we’ve selected a few node-opcua-chunkmanager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-secure-channel / source / secure_message_chunk_manager.ts View on Github external
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);
        });
    }
github node-opcua / node-opcua / packages / node-opcua-secure-channel / src / secure_message_chunk_manager.js View on Github external
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);

node-opcua-chunkmanager

pure nodejs OPCUA SDK - module chunkmanager

MIT
Latest version published 7 days ago

Package Health Score

83 / 100
Full package analysis