GitXplorerGitXplorer
q

github_webhook_message_validator

public
4 stars
2 forks
0 issues

Commits

List of commits on branch main.
Verified
5e98d978168fcfecc0f07364b3bcc7738dfdab9b

Fix link in readme.

qqubyte committed 2 years ago
Verified
85d58027d46b45527813cb4f30078af3fae25ca4

Correct version numbers.

qqubyte committed 2 years ago
Verified
c3f59c8ac7ccdb7765a0f54eacf17c555d472614

Merge pull request #7 from qubyte/bump-deps

qqubyte committed 2 years ago
Verified
e49034dd569a4d8f095d88f041a84eed1aaf1580

Adds a history file.

qqubyte committed 2 years ago
Verified
a4809dd729184e5d59ec1a13e8c63027c733e289

Updates readme with a new suggestion for turning hex into bytes.

qqubyte committed 2 years ago
Verified
ad83a2d4d430024fb6a9cafbaeb6cacead49ada5

Updates dependencies.

qqubyte committed 2 years ago

README

The README file for this repository.

GitHub webhook message validator

This package currently contains a single utility function, which may be used to validate the package of a GitHub webhook request against a shared secret.

Note that if you get the signature from the X-Hub-Signature header, you'll need to convert it to bytes via hex. One way is to use the hex crate decode_to_slice function.

Example

use github_webhook_message_validator::validate;

let signature = &vec![
    115, 109, 127, 147, 66, 242, 167, 210, 57, 175, 165, 81, 58, 75, 178, 40, 62, 14, 21, 136
];
let secret = b"some-secret";
let message = b"blah-blah-blah";

assert_eq!(validate(secret, signature, message), true);