Skip to content

Commit

Permalink
fix(web): correct algorithm name
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Feb 23, 2024
1 parent 6f874c3 commit 57eaae0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/web.ts
Expand Up @@ -26,7 +26,7 @@ async function importKey(secret: string) {
{
// algorithm details
name: "HMAC",
hash: { name: "sha256" },
hash: { name: "SHA256" },
},
false, // export = false
["sign", "verify"], // what this key can do
Expand All @@ -44,7 +44,7 @@ export async function sign(secret: string, payload: string): Promise<string> {
throw new TypeError("[@octokit/webhooks-methods] payload must be a string");
}

const algorithm = "sha256";
const algorithm = "SHA256";
const signature = await crypto.subtle.sign(
"HMAC",
await importKey(secret),
Expand All @@ -71,7 +71,7 @@ export async function verify(
);
}

const algorithm = "sha256";
const algorithm = "SHA256";
return await crypto.subtle.verify(
"HMAC",
await importKey(secret),
Expand Down

0 comments on commit 57eaae0

Please sign in to comment.