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.
2 parents f6081ed + 7e2def7 commit 845da38Copy full SHA for 845da38
src/util/fips.js
@@ -57,6 +57,16 @@ function create_hash_md5_mb() {
57
return wrap;
58
}
59
60
+/**
61
+ * @returns {crypto.Hash}
62
+ */
63
+function create_hash_sha1_mb() {
64
+ const { SHA1_MB } = nb_native();
65
+ const wrap = new HashWrap(new SHA1_MB());
66
+ // @ts-ignore
67
+ return wrap;
68
+}
69
+
70
/**
71
* @param {string} algorithm
72
* @param {object} options
@@ -66,6 +76,8 @@ function create_hash_fips(algorithm, options) {
76
switch (algorithm) {
77
case 'md5':
78
return create_hash_md5_mb();
79
+ case 'sha1':
80
+ return create_hash_sha1_mb();
81
default:
82
return original_crypto.createHash(algorithm, options);
83
0 commit comments