@sd-jwt/hash 0.17.2-next.1 → 0.17.2-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sd-jwt/hash",
3
- "version": "0.17.2-next.1+9e8110d",
3
+ "version": "0.17.2-next.3+8d5a743",
4
4
  "description": "sd-jwt draft 7 implementation in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "license": "Apache-2.0",
39
39
  "devDependencies": {
40
- "@sd-jwt/crypto-nodejs": "0.17.2-next.1+9e8110d"
40
+ "@sd-jwt/crypto-nodejs": "0.17.2-next.3+8d5a743"
41
41
  },
42
42
  "dependencies": {
43
43
  "@noble/hashes": "^2.0.1",
44
- "@sd-jwt/utils": "0.17.2-next.1+9e8110d"
44
+ "@sd-jwt/utils": "0.17.2-next.3+8d5a743"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -59,5 +59,5 @@
59
59
  "esm"
60
60
  ]
61
61
  },
62
- "gitHead": "9e8110d18a7af714d9eb4aa2c3bd66ce56bf18d9"
62
+ "gitHead": "8d5a743f1ff5ae51adea37509b5c24a6c09ede8a"
63
63
  }
@@ -140,7 +140,7 @@ describe('hashing tests', () => {
140
140
  'sha256 - arraybuffer',
141
141
  () => {
142
142
  const data = new TextEncoder().encode('test');
143
- const hashdata = hasher(data, 'sha-256');
143
+ const hashdata = hasher(data.buffer, 'sha-256');
144
144
  const hashdata2 = createHash('sha256').update(data).digest();
145
145
  expect(bytesToHex(hashdata)).toEqual(bytesToHex(hashdata2));
146
146
  },
@@ -160,7 +160,7 @@ describe('hashing tests', () => {
160
160
  'sha-384 - arraybuffer',
161
161
  () => {
162
162
  const data = new TextEncoder().encode('test');
163
- const hashdata = hasher(data, 'sha-384');
163
+ const hashdata = hasher(data.buffer, 'sha-384');
164
164
  const hashdata2 = createHash('sha384').update(data).digest();
165
165
  expect(bytesToHex(hashdata)).toEqual(bytesToHex(hashdata2));
166
166
  },
@@ -180,7 +180,7 @@ describe('hashing tests', () => {
180
180
  'sha-512 - arraybuffer',
181
181
  () => {
182
182
  const data = new TextEncoder().encode('test');
183
- const hashdata = hasher(data, 'sha-512');
183
+ const hashdata = hasher(data.buffer, 'sha-512');
184
184
  const hashdata2 = createHash('sha512').update(data).digest();
185
185
  expect(bytesToHex(hashdata)).toEqual(bytesToHex(hashdata2));
186
186
  },