@3846masa/linebot
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -128,6 +128,6 @@ 'use strict'; | ||
const hmac = (0, _crypto.createHmac)('sha256', this.config.channelSecret); | ||
hmac.update(body); | ||
const calcResult = hmac.digest('base64'); | ||
return calcResult === signature; | ||
const hmac = (0, _crypto.createHmac)('sha256', this.config.channelSecret).update(body).digest('base64'); | ||
const hmacHashed = (0, _crypto.createHash)('sha1').update(hmac).digest(); | ||
const signatureHashed = (0, _crypto.createHash)('sha1').update(signature).digest(); | ||
return hmacHashed.equals(signatureHashed); | ||
} | ||
@@ -134,0 +134,0 @@ /** |
{ | ||
"name": "@3846masa/linebot", | ||
"description": "LINE BOT API wrapper for Node.js", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "3846masa <3846masahiro+git@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
74394
0