mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 01:45:15 +00:00
16 lines
468 B
JavaScript
16 lines
468 B
JavaScript
var exports = module.exports = function SHA (algorithm) {
|
|
algorithm = algorithm.toLowerCase()
|
|
|
|
var Algorithm = exports[algorithm]
|
|
if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
|
|
|
|
return new Algorithm()
|
|
}
|
|
|
|
exports.sha = require('./sha')
|
|
exports.sha1 = require('./sha1')
|
|
exports.sha224 = require('./sha224')
|
|
exports.sha256 = require('./sha256')
|
|
exports.sha384 = require('./sha384')
|
|
exports.sha512 = require('./sha512')
|