PHP 7.4.33
Preview: browser.js Size: 625 B
/var/www/podio.norlys.foo/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: 1 × Files: 8
Name Size Perms Modified Actions
- drwxr-xr-x 2019-03-29 05:48:42
Edit Download
247 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
625 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
46 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
1.07 KB lrw-r--r-- 2018-11-14 11:25:12
Edit Download
111 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
936 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
688 B lrw-r--r-- 2018-11-14 11:25:12
Edit Download
1.43 KB lrw-r--r-- 2018-11-14 11:25:12
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).