How to use the buffer-crc32.signed function in buffer-crc32

To help you get started, we’ve selected a few buffer-crc32 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 oleksiyk / kafka / test / 07.compression.js View on Github external
it('should send/receive with async Gzip compression (>32kb)', function () {
            var buf = new Buffer(90 * 1024), crc = crc32.signed(buf);

            dataHandlerSpy.reset();

            return producer.send({
                topic: 'kafka-test-topic',
                partition: 0,
                message: { value: buf }
            }, { codec: Kafka.COMPRESSION_GZIP })
            .delay(300)
            .then(function () {
                dataHandlerSpy.should.have.been.called; // eslint-disable-line
                dataHandlerSpy.lastCall.args[0].should.be.an('array').and.have.length(1);
                dataHandlerSpy.lastCall.args[1].should.be.a('string', 'kafka-test-topic');
                dataHandlerSpy.lastCall.args[2].should.be.a('number', 0);

                dataHandlerSpy.lastCall.args[0][0].should.be.an('object');
github oleksiyk / kafka / test / 08.connection.js View on Github external
.then(function () {
            dataHandlerSpy.should.have.been.called; // eslint-disable-line
            dataHandlerSpy.lastCall.args[0].should.be.an('array').and.have.length(1);
            dataHandlerSpy.lastCall.args[1].should.be.a('string', 'kafka-test-topic');
            dataHandlerSpy.lastCall.args[2].should.be.a('number', 0);

            dataHandlerSpy.lastCall.args[0][0].should.be.an('object');
            dataHandlerSpy.lastCall.args[0][0].should.have.property('message').that.is.an('object');
            dataHandlerSpy.lastCall.args[0][0].message.should.have.property('value');
            crc32.signed(dataHandlerSpy.lastCall.args[0][0].message.value).should.be.eql(crc);
        });
    });
github No9 / harmon / node_modules / connect / node_modules / express-session / index.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github sdslabs / play / node_modules / express / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github cdapio / cdap / web-cloud-app / server / common / node_modules / express / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github cdapio / cdap / server / sandbox / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github ymichael / puton / node_modules / express / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github Kalli / Disconest / node_modules / express / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}
github cdapio / cdap / web-app / server / common / node_modules / connect / lib / middleware / session.js View on Github external
function hash(sess) {
  return crc32.signed(JSON.stringify(sess, function(key, val){
    if ('cookie' != key) return val;
  }));
}

buffer-crc32

A pure javascript CRC32 algorithm that plays nice with binary data

MIT
Latest version published 9 months ago

Package Health Score

77 / 100
Full package analysis

Similar packages