@waves/ts-lib-crypto
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -101,8 +101,8 @@ "use strict"; | ||
var MessageDigestAdapter = /** @class */ (function () { | ||
function MessageDigestAdapter(sha3Digest) { | ||
function MessageDigestAdapter(sha3Digest, algorithm) { | ||
this.sha3Digest = sha3Digest; | ||
this.algorithm = 'sha3-256'; //fixMe: HACK to make forge work | ||
this.algorithm = algorithm; | ||
} | ||
MessageDigestAdapter.makeCreator = function (sha3Hash) { | ||
return { create: function () { return new MessageDigestAdapter(sha3Hash.create()); } }; | ||
MessageDigestAdapter.makeCreator = function (sha3Hash, algorithmName) { | ||
return { create: function () { return new MessageDigestAdapter(sha3Hash.create(), algorithmName); } }; | ||
}; | ||
@@ -126,6 +126,6 @@ MessageDigestAdapter.prototype.update = function (msg, encoding) { | ||
'SHA512': node_forge_1.md.sha512, | ||
'SHA3-224': MessageDigestAdapter.makeCreator(sha3.sha3_224), | ||
'SHA3-256': MessageDigestAdapter.makeCreator(sha3.sha3_256), | ||
'SHA3-384': MessageDigestAdapter.makeCreator(sha3.sha3_384), | ||
'SHA3-512': MessageDigestAdapter.makeCreator(sha3.sha3_512), | ||
'SHA3-224': MessageDigestAdapter.makeCreator(sha3.sha3_224, 'sha3-224'), | ||
'SHA3-256': MessageDigestAdapter.makeCreator(sha3.sha3_256, 'sha3-256'), | ||
'SHA3-384': MessageDigestAdapter.makeCreator(sha3.sha3_384, 'sha3-384'), | ||
'SHA3-512': MessageDigestAdapter.makeCreator(sha3.sha3_512, 'sha3-512'), | ||
}; | ||
@@ -132,0 +132,0 @@ exports.rsaSign = function (rsaPrivateKey, message, digest) { |
{ | ||
"name": "@waves/ts-lib-crypto", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "This library contains all algorithm implementations like signature verification and protocol entries like address used in Waves.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
612083
5044