Skip to content

Commit 0b0f59f

Browse files
chore(deps): bump @noble/hashes from 1.5.0 to 2.2.0 (#880)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Anderson <brad@sankatygroup.com>
1 parent f796184 commit 0b0f59f

9 files changed

Lines changed: 22 additions & 19 deletions

File tree

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,7 @@ SPEC CHECKSUMS:
28152815
NitroMmkv: afbc5b2fbf963be567c6c545aa1efcf6a9cec68e
28162816
NitroModules: 11bba9d065af151eae51e38a6425e04c3b223ff3
28172817
OpenSSL-Universal: 9110d21982bb7e8b22a962b6db56a8aa805afde7
2818-
QuickCrypto: 6da296072ca4df238901a2055023af9558ae1d01
2818+
QuickCrypto: 6b271caaa2f24335a4bc545bb856984f1001d7e4
28192819
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
28202820
RCTDeprecation: c4b9e2fd0ab200e3af72b013ed6113187c607077
28212821
RCTRequired: e97dd5dafc1db8094e63bc5031e0371f092ae92a

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"@noble/ciphers": "2.0.1",
2626
"@noble/curves": "1.7.0",
27-
"@noble/hashes": "1.5.0",
27+
"@noble/hashes": "2.2.0",
2828
"@react-navigation/bottom-tabs": "7.16.0",
2929
"@react-navigation/native": "7.2.4",
3030
"@react-navigation/native-stack": "7.15.0",

example/src/benchmarks/blake3/blake3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import rnqc from 'react-native-quick-crypto';
2-
import { blake3 as nobleBlake3 } from '@noble/hashes/blake3';
2+
import { blake3 as nobleBlake3 } from '@noble/hashes/blake3.js';
33
import type { BenchFn } from '../../types/benchmarks';
44
import { Bench } from 'tinybench';
55

example/src/benchmarks/hash/hash.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import rnqc from 'react-native-quick-crypto';
2-
import { sha256 } from '@noble/hashes/sha2';
2+
import { sha256 } from '@noble/hashes/sha2.js';
3+
import { utf8ToBytes } from '@noble/hashes/utils.js';
34
// @ts-expect-error - crypto-browserify is not typed
45
import browserify from 'crypto-browserify';
56
import type { BenchFn } from '../../types/benchmarks';
@@ -21,7 +22,7 @@ const hash_sha256_8mb_string: BenchFn = () => {
2122
hash.digest('hex');
2223
})
2324
.add('@noble/hashes/sha256', () => {
24-
sha256(text8MB);
25+
sha256(utf8ToBytes(text8MB));
2526
})
2627
.add('browserify', () => {
2728
const hash = browserify.createHash('sha256');
@@ -47,7 +48,7 @@ const hash_sha256_1mb_string: BenchFn = () => {
4748
hash.digest('hex');
4849
})
4950
.add('@noble/hashes/sha256', () => {
50-
sha256(text1MB);
51+
sha256(utf8ToBytes(text1MB));
5152
})
5253
.add('browserify', () => {
5354
const hash = browserify.createHash('sha256');

example/src/benchmarks/hkdf/hkdf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import rnqc, { Buffer } from 'react-native-quick-crypto';
2-
import { hkdf } from '@noble/hashes/hkdf';
3-
import { sha256 } from '@noble/hashes/sha2';
2+
import { hkdf } from '@noble/hashes/hkdf.js';
3+
import { sha256 } from '@noble/hashes/sha2.js';
44
import type { BenchFn } from '../../types/benchmarks';
55
import { Bench } from 'tinybench';
66

example/src/benchmarks/hmac/hmac.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import rnqc from 'react-native-quick-crypto';
22
// @ts-expect-error - crypto-browserify is not typed
33
import browserify from 'crypto-browserify';
4-
import { hmac } from '@noble/hashes/hmac';
5-
import { sha256 } from '@noble/hashes/sha2';
4+
import { hmac } from '@noble/hashes/hmac.js';
5+
import { sha256 } from '@noble/hashes/sha2.js';
6+
import { utf8ToBytes } from '@noble/hashes/utils.js';
67
import type { BenchFn } from '../../types/benchmarks';
78
import { Bench } from 'tinybench';
89
import { text1MB, text8MB, buffer1MB, buffer8MB } from '../testData';
910

1011
const hmacKey = 'test-key-for-hmac-benchmarks';
12+
const hmacKeyBytes = utf8ToBytes(hmacKey);
1113

1214
const hmac_sha256_8mb_string: BenchFn = () => {
1315
const bench = new Bench({
@@ -24,7 +26,7 @@ const hmac_sha256_8mb_string: BenchFn = () => {
2426
h.digest('hex');
2527
})
2628
.add('@noble/hashes/hmac', () => {
27-
hmac(sha256, hmacKey, text8MB);
29+
hmac(sha256, hmacKeyBytes, utf8ToBytes(text8MB));
2830
})
2931
.add('browserify', () => {
3032
const h = browserify.createHmac('sha256', hmacKey);
@@ -50,7 +52,7 @@ const hmac_sha256_1mb_string: BenchFn = () => {
5052
h.digest('hex');
5153
})
5254
.add('@noble/hashes/hmac', () => {
53-
hmac(sha256, hmacKey, text1MB);
55+
hmac(sha256, hmacKeyBytes, utf8ToBytes(text1MB));
5456
})
5557
.add('browserify', () => {
5658
const h = browserify.createHmac('sha256', hmacKey);
@@ -76,7 +78,7 @@ const hmac_sha256_8mb_buffer: BenchFn = () => {
7678
h.digest('hex');
7779
})
7880
.add('@noble/hashes/hmac', () => {
79-
hmac(sha256, hmacKey, buffer8MB);
81+
hmac(sha256, hmacKeyBytes, buffer8MB);
8082
})
8183
.add('browserify', () => {
8284
const h = browserify.createHmac('sha256', hmacKey);
@@ -102,7 +104,7 @@ const hmac_sha256_1mb_buffer: BenchFn = () => {
102104
h.digest('hex');
103105
})
104106
.add('@noble/hashes/hmac', () => {
105-
hmac(sha256, hmacKey, buffer1MB);
107+
hmac(sha256, hmacKeyBytes, buffer1MB);
106108
})
107109
.add('browserify', () => {
108110
const h = browserify.createHmac('sha256', hmacKey);

example/src/benchmarks/pbkdf2/pbkdf2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import rnqc from 'react-native-quick-crypto';
2-
import * as noble from '@noble/hashes/pbkdf2';
3-
import { sha256 } from '@noble/hashes/sha2';
2+
import * as noble from '@noble/hashes/pbkdf2.js';
3+
import { sha256 } from '@noble/hashes/sha2.js';
44
// @ts-expect-error - crypto-browserify is not typed
55
import browserify from 'crypto-browserify';
66
import type { BenchFn } from '../../types/benchmarks';

example/src/benchmarks/scrypt/scrypt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import rnqc from 'react-native-quick-crypto';
2-
import * as noble from '@noble/hashes/scrypt';
2+
import * as noble from '@noble/hashes/scrypt.js';
33
import type { BenchFn } from '../../types/benchmarks';
44
import { Bench } from 'tinybench';
55

0 commit comments

Comments
 (0)