Skip to content

Commit 57eaae0

Browse files
committed
fix(web): correct algorithm name
1 parent 6f874c3 commit 57eaae0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/web.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function importKey(secret: string) {
2626
{
2727
// algorithm details
2828
name: "HMAC",
29-
hash: { name: "sha256" },
29+
hash: { name: "SHA256" },
3030
},
3131
false, // export = false
3232
["sign", "verify"], // what this key can do
@@ -44,7 +44,7 @@ export async function sign(secret: string, payload: string): Promise<string> {
4444
throw new TypeError("[@octokit/webhooks-methods] payload must be a string");
4545
}
4646

47-
const algorithm = "sha256";
47+
const algorithm = "SHA256";
4848
const signature = await crypto.subtle.sign(
4949
"HMAC",
5050
await importKey(secret),
@@ -71,7 +71,7 @@ export async function verify(
7171
);
7272
}
7373

74-
const algorithm = "sha256";
74+
const algorithm = "SHA256";
7575
return await crypto.subtle.verify(
7676
"HMAC",
7777
await importKey(secret),

0 commit comments

Comments
 (0)