PHP 7.4.33
Preview: browser.js Size: 625 B
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/create-hash/browser.js
'use strict'
var inherits = require('inherits')
var MD5 = require('md5.js')
var RIPEMD160 = require('ripemd160')
var sha = require('sha.js')
var Base = require('cipher-base')

function Hash (hash) {
  Base.call(this, 'digest')

  this._hash = hash
}

inherits(Hash, Base)

Hash.prototype._update = function (data) {
  this._hash.update(data)
}

Hash.prototype._final = function () {
  return this._hash.digest()
}

module.exports = function createHash (alg) {
  alg = alg.toLowerCase()
  if (alg === 'md5') return new MD5()
  if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()

  return new Hash(sha(alg))
}

Directory Contents

Dirs: 0 × Files: 8
Name Size Perms Modified Actions
247 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
625 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
46 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.07 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
111 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.87 KB lrw-r--r-- 2024-05-28 16:34:56
Edit Download
688 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.43 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).