Skip to content

Commit

Permalink
feat: default to SHA-384 for signature authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Feb 26, 2024
1 parent 38699c7 commit b8542f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Transloadit.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ class TransloaditClient {
return { signature, params: jsonParams }
}

_calcSignature(toSign) {
return crypto
.createHmac('sha1', this._authSecret)
_calcSignature(toSign, algorithm = 'sha384') {
return algorithm + ':' + crypto
.createHmac(algorithm, this._authSecret)
.update(Buffer.from(toSign, 'utf-8'))
.digest('hex')
}
Expand Down

0 comments on commit b8542f6

Please sign in to comment.