Skip to content

Commit

Permalink
Change replace method in generateSignature to replace multiple occure…
Browse files Browse the repository at this point in the history
…nces instead of the first one (#13)
  • Loading branch information
BigFax authored Oct 12, 2020
1 parent a6a57a5 commit 9af3291
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const generateSignature = function(content, secret) {
crypto.createHmac('sha256', secret)
.update(content)
.digest('base64')
.replace('=', '')
.replace('+', '-')
.replace('/', '_')
.replace(/=/g, '')
.replace(/\+/g, '-')
.replace(/\//g, '_')
);
};

Expand Down

0 comments on commit 9af3291

Please sign in to comment.