@polkadot/util-crypto
Advanced tools
Comparing version 0.14.1 to 0.14.2
@@ -10,3 +10,3 @@ 'use strict'; | ||
@name keccakAsBuffer | ||
@signature keccakAsBuffer (value: Buffer | string): Buffer | ||
@signature keccakAsBuffer (value: Buffer | Uint8Array | string): Buffer | ||
@summary Creates a keccak Buffer from the input. | ||
@@ -21,3 +21,5 @@ @description | ||
module.exports = function keccakAsBuffer(value) { | ||
// HACK: For the time being, don't change the definition (although fork of library is used) | ||
// flowlint-next-line unclear-type:off | ||
return createKeccak('keccak256').update(value).digest(); | ||
}; |
@@ -12,3 +12,3 @@ 'use strict'; | ||
@name keccakAsHex | ||
@signature keccakAsHex (value: Buffer | string): string | ||
@signature keccakAsHex (value: Buffer | Uint8Array | string): string | ||
@summary Creates a keccak hex string from the input. | ||
@@ -15,0 +15,0 @@ @description |
@@ -10,3 +10,3 @@ 'use strict'; | ||
@name keccakAsString | ||
@signature keccakAsString (value: Buffer | string): string | ||
@signature keccakAsString (value: Buffer | Uint8Array | string): string | ||
@summary Creates a keccak string from the input. | ||
@@ -13,0 +13,0 @@ @description |
@@ -7,7 +7,7 @@ 'use strict'; | ||
var bufferToU8a = require('@polkadot/util/buffer/toU8a'); | ||
var createKeccak = require('keccak'); | ||
var keccakAsBuffer = require('./asBuffer'); | ||
/** | ||
@name keccakAsU8a | ||
@signature keccakAsU8a (value: Buffer | string): Uint8Array | ||
@signature keccakAsU8a (value: Buffer | Uint8Array | string): Uint8Array | ||
@summary Creates a keccak Uint8Array from the input. | ||
@@ -22,3 +22,3 @@ @description | ||
module.exports = function keccakAsU8a(value) { | ||
return bufferToU8a(createKeccak('keccak256').update(value).digest()); | ||
return bufferToU8a(keccakAsBuffer(value)); | ||
}; |
{ | ||
"name": "@polkadot/util-crypto", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "A collection of useful crypto utilities for @polkadot", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"blakejs": "^1.1.0", | ||
"keccak": "^1.3.0", | ||
"keccak": "jacogr/keccak#f25ae4b299038bb2f0b72f150b99b5048ffb9e48", | ||
"tweetnacl": "^1.0.0", | ||
@@ -37,0 +37,0 @@ "xxhashjs": "^0.2.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
112904
943
1
- Removedbindings@1.5.0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedkeccak@1.4.0(transitive)
- Removednan@2.22.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
Updatedkeccak@jacogr/keccak#f25ae4b299038bb2f0b72f150b99b5048ffb9e48