@walletconnect/iso-crypto
Advanced tools
Comparing version 1.7.2-rc.0 to 1.7.3
@@ -5,7 +5,7 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const crypto = (0, tslib_1.__importStar)(require("@walletconnect/crypto")); | ||
const encoding = (0, tslib_1.__importStar)(require("@walletconnect/encoding")); | ||
const crypto = tslib_1.__importStar(require("@walletconnect/crypto")); | ||
const encoding = tslib_1.__importStar(require("@walletconnect/encoding")); | ||
const utils_1 = require("@walletconnect/utils"); | ||
function generateKey(length) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const _length = (length || 256) / 8; | ||
@@ -19,3 +19,3 @@ const bytes = crypto.randomBytes(_length); | ||
function verifyHmac(payload, key) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const cipherText = encoding.hexToArray(payload.data); | ||
@@ -36,3 +36,3 @@ const iv = encoding.hexToArray(payload.iv); | ||
function encrypt(data, key, providedIv) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const _key = encoding.bufferToArray((0, utils_1.convertArrayBufferToBuffer)(key)); | ||
@@ -58,3 +58,3 @@ const ivArrayBuffer = providedIv || (yield generateKey(128)); | ||
function decrypt(payload, key) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const _key = encoding.bufferToArray((0, utils_1.convertArrayBufferToBuffer)(key)); | ||
@@ -61,0 +61,0 @@ if (!_key) { |
{ | ||
"name": "@walletconnect/iso-crypto", | ||
"version": "1.7.2-rc.0", | ||
"version": "1.7.3", | ||
"description": "Isomorphic Crypto for WalletConnect", | ||
@@ -65,6 +65,6 @@ "scripts": { | ||
"@walletconnect/crypto": "^1.0.1", | ||
"@walletconnect/types": "^1.7.2-rc.0", | ||
"@walletconnect/utils": "^1.7.2-rc.0" | ||
"@walletconnect/types": "^1.7.3", | ||
"@walletconnect/utils": "^1.7.3" | ||
}, | ||
"gitHead": "165f7993c2acc907c653c02847fb02721052c6e7" | ||
} |
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 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
202937
597
0
Updated@walletconnect/types@^1.7.3
Updated@walletconnect/utils@^1.7.3