1 |
3a515b92
|
cagy
|
var exports = module.exports = function SHA (algorithm) {
|
2 |
|
|
algorithm = algorithm.toLowerCase()
|
3 |
|
|
|
4 |
|
|
var Algorithm = exports[algorithm]
|
5 |
|
|
if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
|
6 |
|
|
|
7 |
|
|
return new Algorithm()
|
8 |
|
|
}
|
9 |
|
|
|
10 |
|
|
exports.sha = require('./sha')
|
11 |
|
|
exports.sha1 = require('./sha1')
|
12 |
|
|
exports.sha224 = require('./sha224')
|
13 |
|
|
exports.sha256 = require('./sha256')
|
14 |
|
|
exports.sha384 = require('./sha384')
|
15 |
|
|
exports.sha512 = require('./sha512')
|