403Webshell
Server IP : 193.86.120.172  /  Your IP : 216.73.216.67
Web Server : Apache/2.4.63 (Unix)
System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64
User : kubec ( 1026)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /volume1/@appstore/SynologyApplicationService/node_modules/buffer-equal-constant-time/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /volume1/@appstore/SynologyApplicationService/node_modules/buffer-equal-constant-time/test.js
/*jshint node:true */
'use strict';

var bufferEq = require('./index');
var assert = require('assert');

describe('buffer-equal-constant-time', function() {
  var a = new Buffer('asdfasdf123456');
  var b = new Buffer('asdfasdf123456');
  var c = new Buffer('asdfasdf');

  describe('bufferEq', function() {
    it('says a == b', function() {
      assert.strictEqual(bufferEq(a, b), true);
    });

    it('says a != c', function() {
      assert.strictEqual(bufferEq(a, c), false);
    });
  });

  describe('install/restore', function() {
    before(function() {
      bufferEq.install();
    });
    after(function() {
      bufferEq.restore();
    });

    it('installed an .equal method', function() {
      var SlowBuffer = require('buffer').SlowBuffer;
      assert.ok(Buffer.prototype.equal);
      assert.ok(SlowBuffer.prototype.equal);
    });

    it('infected existing Buffers', function() {
      assert.strictEqual(a.equal(b), true);
      assert.strictEqual(a.equal(c), false);
    });
  });

});

Youez - 2016 - github.com/yon3zu
LinuXploit