fetch-signature
Advanced tools
Comparing version 1.3.0 to 1.3.1
const VALID_ALGORITMS = ["rsa-sha256", "rsa-sha384", "rsa-sha512"]; | ||
const utf8TextDecoder = new TextDecoder("utf8"); | ||
export function getRequestLine(options) { | ||
@@ -58,6 +57,5 @@ if (!options.url) { | ||
}, options.keyPair.privateKey, new TextEncoder().encode(signingString)); | ||
const utf8 = utf8TextDecoder.decode(signature); | ||
const base64 = btoa(utf8); | ||
const base64 = btoa(String.fromCharCode(...new Uint8Array(signature))); | ||
return `Signature keyId=${options.keyId},algorithm="${options.algorithm || algorithm}",headers="${options.include.join(" ")}",signature="${base64}"`; | ||
} | ||
//# sourceMappingURL=sign.js.map |
{ | ||
"name": "fetch-signature", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
@@ -14,4 +14,2 @@ const VALID_ALGORITMS = ["rsa-sha256", "rsa-sha384", "rsa-sha512"]; | ||
const utf8TextDecoder = new TextDecoder("utf8"); | ||
export function getRequestLine(options: SignOptions): string { | ||
@@ -80,5 +78,4 @@ if (!options.url) { | ||
); | ||
const utf8 = utf8TextDecoder.decode(signature); | ||
const base64 = btoa(utf8); | ||
const base64 = btoa(String.fromCharCode(...new Uint8Array(signature))); | ||
return `Signature keyId=${options.keyId},algorithm="${options.algorithm || algorithm}",headers="${options.include.join(" ")}",signature="${base64}"`; | ||
} |
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
23550
242