Skip to content

Commit 76300a7

Browse files
targosphillipj
authored andcommitted
github-secret: replace usage of Buffer constructor (#132)
1 parent 6ea39a7 commit 76300a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/github-secret.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const crypto = require('crypto')
33
const secret = process.env.GITHUB_WEBHOOK_SECRET || 'hush-hush'
44

55
function sign (data) {
6-
const buffer = new Buffer(data, 'utf8')
6+
const buffer = Buffer.from(data, 'utf8')
77
return 'sha1=' + crypto.createHmac('sha1', secret).update(buffer).digest('hex')
88
}
99

0 commit comments

Comments
 (0)