hive-keychain-commons 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,15 +30,15 @@ const sha256 = (input) => {
|
|
|
30
30
|
if (typeof input !== 'string') {
|
|
31
31
|
input = crypto_js_1.lib.WordArray.create(input);
|
|
32
32
|
}
|
|
33
|
-
const hash = Buffer.from((0, crypto_js_1.SHA256)(input).toString(
|
|
33
|
+
const hash = Buffer.from((0, crypto_js_1.SHA256)(input).toString(crypto_js_1.enc.Hex), 'hex');
|
|
34
34
|
return hash;
|
|
35
35
|
};
|
|
36
36
|
const ripemd160 = (input) => {
|
|
37
37
|
// return crypto.createHash('ripemd160').update(input).digest()
|
|
38
38
|
if (typeof input !== 'string') {
|
|
39
|
-
input =
|
|
39
|
+
input = crypto_js_1.lib.WordArray.create(input);
|
|
40
40
|
}
|
|
41
|
-
const hash = Buffer.from((0, crypto_js_1.RIPEMD160)(input).toString(
|
|
41
|
+
const hash = Buffer.from((0, crypto_js_1.RIPEMD160)(input).toString(crypto_js_1.enc.Hex), 'hex');
|
|
42
42
|
return hash;
|
|
43
43
|
};
|
|
44
44
|
const isWif = (privWif) => {
|