Skip to content

Commit

Permalink
refactor: changing sha1 to sha256 per lgtm alert
Browse files Browse the repository at this point in the history
SHA1 is considered a broken or weak cryptographic algorithm by LGTM.com
  • Loading branch information
Reinaldy Rafli committed Jun 25, 2021
1 parent 4f13ed7 commit c5d0451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function randomBase62(length: number): string {
* @returns {String} Hashed string
*/
export function hash(str: string): string {
return createHash('sha1')
return createHash('sha256')
.update(str, 'ascii')
.digest('base64')
.replace(/=+$/, '')
Expand Down

0 comments on commit c5d0451

Please sign in to comment.