Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : old-crypto.js
'use strict';

var assert = require('assert');
var crypto = require('crypto');
var hash = require('../index');
var validSha1 = /^[0-9a-f]{40}$/i;
var validBase64 = /^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/==]{4})$/;

describe('hash() without crypto.getHashes', function() {
  var getHashes_;
  beforeEach(function() {
    getHashes_ = crypto.getHashes;
    delete crypto.getHashes;
  });
  
  afterEach(function() {
    crypto.getHashes = getHashes_;
  });
  
  it('should work fine for SHA1', function() {
    assert.ok(validSha1.test(hash(42)), 'hash some value');
    assert.ok(validSha1.test(hash(NaN)), 'hash some value');
  });
});

describe('hash() without Duplex streams', function() {
  var createHash_;
  beforeEach(function() {
    createHash_ = crypto.createHash;
    crypto.createHash = function(algorithm) {
      var strm = createHash_(algorithm);
      
      return {
        update: strm.write.bind(strm),
        digest: strm.digest.bind(strm)
      };
    };
  });
  
  afterEach(function() {
    crypto.createHash = createHash_;
  });
  
  it('should work fine for SHA1 without .write()/.read()', function() {
    assert.ok(validSha1.test(hash(42)), 'hash some value');
    assert.ok(validSha1.test(hash(NaN)), 'hash some value');
  });
  
  it('should work fine for SHA1 without .write()/.read() with base64', function() {
    assert.ok(validBase64.test(hash(42, {encoding: 'base64'})), 'hash some value');
    assert.ok(validBase64.test(hash(NaN, {encoding: 'base64'})), 'hash some value');
  });
  
  if (typeof Buffer !== 'undefined') {
    it('should work fine for SHA1 without .write()/.read() with buffer', function() {
      assert.ok(Buffer.isBuffer(hash(42, {encoding: 'buffer'})), 'hash some value');
      assert.ok(Buffer.isBuffer(hash(NaN, {encoding: 'buffer'})), 'hash some value');
    });
  }
});
© 2026 GrazzMean
Page non trouvée – APK Comptoir Hammami
Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.

404 :(

Oups ! Cette page est introuvable.

Il semble que nous ne puissions pas trouver ce que vous cherchez. Peut-être qu'une recherche pourrait vous aider.

Bouton retour en haut de la page