Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diahook

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diahook - npm Package Compare versions

Comparing version 0.8.2 to 0.9.1

2

package.json
{
"name": "diahook",
"version": "0.8.2",
"version": "0.9.1",
"description": "Diahook API client",

@@ -5,0 +5,0 @@ "author": "diahook",

@@ -266,4 +266,9 @@ import {

export class Webhook {
public static verify(
secret: string,
private readonly key: Uint8Array;
constructor(secret: string) {
this.key = base64.decode(secret);
}
public verify(
payload: string,

@@ -279,4 +284,3 @@ headers: WebhookRequiredHeaders | Record<string, string>

);
const key = base64.decode(secret);
const signature = base64.encode(sha256.hmac(key, toSign));
const signature = base64.encode(sha256.hmac(this.key, toSign));
if (signature !== headers["dh-signature"]) {

@@ -283,0 +287,0 @@ throw new WebhookVerificationError("Signature mismatch");

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc