mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-05 05:55:46 +00:00
13 lines
402 B
JavaScript
13 lines
402 B
JavaScript
var exports = module.exports = function (alg) {
|
|
var Alg = exports[alg]
|
|
if(!Alg) throw new Error(alg + ' is not supported (we accept pull requests)')
|
|
return new Alg()
|
|
}
|
|
|
|
var Buffer = require('buffer').Buffer
|
|
var Hash = require('./hash')(Buffer)
|
|
|
|
exports.sha1 = require('./sha1')(Buffer, Hash)
|
|
exports.sha256 = require('./sha256')(Buffer, Hash)
|
|
exports.sha512 = require('./sha512')(Buffer, Hash)
|