Skip to content

Commit

Permalink
Merge pull request #23 from statsig-io/4-28sha
Browse files Browse the repository at this point in the history
patch sha256 library bug in dependency
  • Loading branch information
jacob-statsig authored Aug 28, 2023
2 parents f64014a + 071000e commit 7d1f6c3
Show file tree
Hide file tree
Showing 5 changed files with 725 additions and 18 deletions.
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "statsig-js",
"version": "4.28.1",
"version": "4.28.2",
"description": "Statsig JavaScript client SDK for single user environments.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -54,7 +54,6 @@
"webpack-cli": "^4.7.2"
},
"dependencies": {
"js-sha256": "^0.9.0",
"uuid": "^8.3.2",
"whatwg-fetch": "^3.6.2"
},
Expand Down
4 changes: 2 additions & 2 deletions src/utils/Hashing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sha256 } from 'js-sha256';
import { StatsigUser } from '../StatsigUser';
import { Base64 } from './Base64';
import { sha256create } from './js-sha256';

export function SimpleHash(value: string): string {
var hash = 0;
Expand All @@ -13,7 +13,7 @@ export function SimpleHash(value: string): string {
}

export function getHashValue(value: string): string {
let buffer = sha256.create().update(value).arrayBuffer();
let buffer = sha256create().update(value).arrayBuffer();
return Base64.encodeArrayBuffer(buffer);
}

Expand Down
Loading

0 comments on commit 7d1f6c3

Please sign in to comment.