http-message-signatures
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -41,6 +41,12 @@ "use strict"; | ||
case 'ecdsa-p256-sha256': | ||
signer.sign = async (data) => (0, crypto_1.createSign)('sha256').update(data).sign(key); | ||
signer.sign = async (data) => (0, crypto_1.createSign)('sha256').update(data).sign({ | ||
key: key, | ||
dsaEncoding: 'ieee-p1363', | ||
}); | ||
break; | ||
case 'ecdsa-p384-sha384': | ||
signer.sign = async (data) => (0, crypto_1.createSign)('sha384').update(data).sign(key); | ||
signer.sign = async (data) => (0, crypto_1.createSign)('sha384').update(data).sign({ | ||
key: key, | ||
dsaEncoding: 'ieee-p1363', | ||
}); | ||
break; | ||
@@ -100,6 +106,12 @@ case 'ed25519': | ||
case 'ecdsa-p256-sha256': | ||
verifier = async (data, signature) => (0, crypto_1.createVerify)('sha256').update(data).verify(key, signature); | ||
verifier = async (data, signature) => (0, crypto_1.createVerify)('sha256').update(data).verify({ | ||
key: key, | ||
dsaEncoding: 'ieee-p1363', | ||
}, signature); | ||
break; | ||
case 'ecdsa-p384-sha384': | ||
verifier = async (data, signature) => (0, crypto_1.createVerify)('sha384').update(data).verify(key, signature); | ||
verifier = async (data, signature) => (0, crypto_1.createVerify)('sha384').update(data).verify({ | ||
key: key, | ||
dsaEncoding: 'ieee-p1363', | ||
}, signature); | ||
break; | ||
@@ -106,0 +118,0 @@ case 'ed25519': |
@@ -15,3 +15,3 @@ /// <reference types="node" /> | ||
export type VerifierFinder = (parameters: SignatureParameters) => Promise<VerifyingKey | null>; | ||
export type Algorithm = 'rsa-v1_5-sha256' | 'ecdsa-p256-sha256' | 'hmac-sha256' | 'rsa-pss-sha512' | string; | ||
export type Algorithm = 'rsa-v1_5-sha256' | 'ecdsa-p256-sha256' | 'ecdsa-p384-sha384' | 'ed25519' | 'hmac-sha256' | 'rsa-pss-sha512' | string; | ||
export interface SigningKey { | ||
@@ -18,0 +18,0 @@ /** |
{ | ||
"name": "http-message-signatures", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "HTTP message signature implementation", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
112803
1358