screenshotone-api-sdk
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -7,3 +7,5 @@ "use strict"; | ||
async function signQueryString(queryString, secretKey) { | ||
const webCrypto = crypto ? crypto : new webcrypto_1.Crypto(); | ||
const webCrypto = typeof globalThis.crypto !== "undefined" | ||
? globalThis.crypto | ||
: new webcrypto_1.Crypto(); | ||
let algorithm = { name: "HMAC", hash: "SHA-256" }; | ||
@@ -10,0 +12,0 @@ let key = await webCrypto.subtle.importKey("raw", encoder.encode(secretKey), algorithm, false, ["sign", "verify"]); |
{ | ||
"name": "screenshotone-api-sdk", | ||
"homepage": "https://screenshotone.com", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Use ScreenshotOne.com API to generate screenshots of any website.", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -6,3 +6,6 @@ import { Crypto } from "@peculiar/webcrypto"; | ||
export async function signQueryString(queryString: string, secretKey: string) { | ||
const webCrypto = crypto ? crypto : new Crypto(); | ||
const webCrypto = | ||
typeof globalThis.crypto !== "undefined" | ||
? globalThis.crypto | ||
: new Crypto(); | ||
@@ -9,0 +12,0 @@ let algorithm = { name: "HMAC", hash: "SHA-256" }; |
97966
2704