@liskhq/lisk-cryptography
Advanced tools
Comparing version 4.0.0-rc.1 to 4.0.0-rc.2
@@ -29,3 +29,3 @@ "use strict"; | ||
if (!path.startsWith('m') || !path.includes('/')) { | ||
throw new Error('Invalid path format'); | ||
throw new Error('Invalid key derivation path format'); | ||
} | ||
@@ -37,7 +37,7 @@ return (path | ||
if (!/^[0-9']+$/g.test(segment)) { | ||
throw new Error('Invalid path format'); | ||
throw new Error('Invalid key derivation path format'); | ||
} | ||
if (segment.includes(`'`)) { | ||
if (parseInt(segment.slice(0, -1), 10) > constants_1.MAX_UINT32 / 2) { | ||
throw new Error('Invalid path format'); | ||
throw new Error('Invalid key derivation path format'); | ||
} | ||
@@ -47,3 +47,3 @@ return parseInt(segment, 10) + constants_1.HARDENED_OFFSET; | ||
if (parseInt(segment, 10) > constants_1.MAX_UINT32) { | ||
throw new Error('Invalid path format'); | ||
throw new Error('Invalid key derivation path format'); | ||
} | ||
@@ -50,0 +50,0 @@ return parseInt(segment, 10); |
{ | ||
"name": "@liskhq/lisk-cryptography", | ||
"version": "4.0.0-rc.1", | ||
"version": "4.0.0-rc.2", | ||
"description": "General cryptographic functions for use with Lisk-related software", | ||
@@ -5,0 +5,0 @@ "author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>", |
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
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
118431