We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa2707 commit 1839fb7Copy full SHA for 1839fb7
index.js
@@ -1,9 +1,11 @@
1
-var exports = module.exports = function (alg) {
2
- var Alg = exports[alg.toLowerCase()]
3
- if(!Alg) throw new Error(alg + ' is not supported (we accept pull requests)')
4
- return new Alg()
5
-}
+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)')
6
7
+ return new Algorithm()
8
+}
9
10
exports.sha = require('./sha')
11
exports.sha1 = require('./sha1')
0 commit comments