@depay/js-verify-signature-web
Advanced tools
Comparing version 3.1.2 to 3.1.3
declare function verify({ | ||
signature: string, | ||
publicKey: string, | ||
data: string, | ||
saltLength?: number | ||
data: string | object, | ||
}): Promise<boolean>; | ||
@@ -7,0 +6,0 @@ |
@@ -26,2 +26,14 @@ const string2ArrayBuffer = (str)=> { | ||
if(typeof signature !== 'string' || signature === undefined) { | ||
throw('signature missing!') | ||
} | ||
if(data === undefined || data.length === 0) { | ||
throw('data missing!') | ||
} | ||
if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) { | ||
throw('publicKey missing!') | ||
} | ||
let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, ''); | ||
@@ -28,0 +40,0 @@ while (innerPublicKey.length % 4) { // add proper padding |
declare function verify({ | ||
signature: string, | ||
publicKey: string, | ||
data: string, | ||
saltLength?: number | ||
data: string | object, | ||
}): Promise<boolean>; | ||
@@ -7,0 +6,0 @@ |
@@ -26,2 +26,14 @@ const string2ArrayBuffer = (str)=> { | ||
if(typeof signature !== 'string' || signature === undefined) { | ||
throw('signature missing!') | ||
} | ||
if(data === undefined || data.length === 0) { | ||
throw('data missing!') | ||
} | ||
if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) { | ||
throw('publicKey missing!') | ||
} | ||
let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, ''); | ||
@@ -28,0 +40,0 @@ while (innerPublicKey.length % 4) { // add proper padding |
declare function verify({ | ||
signature: string, | ||
publicKey: string, | ||
data: string, | ||
saltLength?: number | ||
data: string | object, | ||
}): Promise<boolean>; | ||
@@ -7,0 +6,0 @@ |
@@ -32,2 +32,14 @@ (function (global, factory) { | ||
if(typeof signature !== 'string' || signature === undefined) { | ||
throw('signature missing!') | ||
} | ||
if(data === undefined || data.length === 0) { | ||
throw('data missing!') | ||
} | ||
if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) { | ||
throw('publicKey missing!') | ||
} | ||
let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, ''); | ||
@@ -34,0 +46,0 @@ while (innerPublicKey.length % 4) { // add proper padding |
declare function verify({ | ||
signature: string, | ||
publicKey: string, | ||
data: string, | ||
saltLength?: number | ||
data: string | object, | ||
}): Promise<boolean>; | ||
@@ -7,0 +6,0 @@ |
@@ -32,2 +32,14 @@ (function (global, factory) { | ||
if(typeof signature !== 'string' || signature === undefined) { | ||
throw('signature missing!') | ||
} | ||
if(data === undefined || data.length === 0) { | ||
throw('data missing!') | ||
} | ||
if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) { | ||
throw('publicKey missing!') | ||
} | ||
let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, ''); | ||
@@ -34,0 +46,0 @@ while (innerPublicKey.length % 4) { // add proper padding |
{ | ||
"name": "@depay/js-verify-signature-web", | ||
"moduleName": "DePayVerifySignature", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "JavaScript library to verify RSA PSS SHA256 signatures with a given public key.", | ||
@@ -6,0 +6,0 @@ "main": "dist/umd/index.web.js", |
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
12537
226