Skip to content

Commit

Permalink
chore: remove removed algorithm property calls in readme.md (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Jul 19, 2024
1 parent 114b397 commit dd70dfd
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ import { sign, verify, verifyWithFallback } from "@octokit/webhooks-methods";
await sign("mysecret", eventPayloadString);
// resolves with a string like "sha256=4864d2759938a15468b5df9ade20bf161da9b4f737ea61794142f3484236bda3"

await sign({ secret: "mysecret", algorithm: "sha1" }, eventPayloadString);
// resolves with a string like "sha1=d03207e4b030cf234e3447bac4d93add4c6643d8"

await verify("mysecret", eventPayloadString, "sha256=486d27...");
// resolves with true or false

Expand All @@ -83,7 +80,6 @@ await verifyWithFallback("mysecret", eventPayloadString, "sha256=486d27...", ["o

```js
await sign(secret, eventPayloadString);
await sign({ secret, algorithm }, eventPayloadString);
```

<table width="100%">
Expand All @@ -99,23 +95,6 @@ await sign({ secret, algorithm }, eventPayloadString);
Secret as configured in GitHub Settings.
</td>
</tr>
<tr>
<td>
<code>
algorithm
</code>
<em>
(String)
</em>
</td>
<td>

Algorithm to calculate signature. Can be set to `sha1` or `sha256`. `sha1` is supported for legacy reasons. GitHub Enterprise Server 2.22 and older do not send the `X-Hub-Signature-256` header. Defaults to `sha256`.

Learn more at [Validating payloads from GitHub](https://docs.github.com/en/developers/webhooks-and-events/securing-your-webhooks#validating-payloads-from-github)

</td>
</tr>
<tr>
<td>
<code>
Expand Down

0 comments on commit dd70dfd

Please sign in to comment.