Skip to content

Commit e9ec818

Browse files
authored
fix: global Buffer usage (#962)
1 parent 8446e86 commit e9ec818

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

example/src/tests/subtle/derive_key.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { test } from '../util';
22
import { expect } from 'chai';
3-
import { subtle, getRandomValues } from 'react-native-quick-crypto';
4-
import { CryptoKey } from 'react-native-quick-crypto';
5-
import type { CryptoKeyPair } from 'react-native-quick-crypto';
3+
import { subtle, getRandomValues, Buffer } from 'react-native-quick-crypto';
4+
import type { CryptoKey, CryptoKeyPair } from 'react-native-quick-crypto';
65

76
// eslint-disable-next-line @typescript-eslint/no-explicit-any
87
const subtleAny = subtle as any;

example/src/tests/subtle/wrap_unwrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { test } from '../util';
22
import { expect } from 'chai';
3-
import { subtle, getRandomValues } from 'react-native-quick-crypto';
3+
import { subtle, getRandomValues, Buffer } from 'react-native-quick-crypto';
44
import type {
55
AesOcbParams,
66
CryptoKey,

packages/react-native-quick-crypto/src/hash.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Stream } from 'readable-stream';
22
import { NitroModules } from 'react-native-nitro-modules';
33
import type { TransformOptions } from 'readable-stream';
4+
import { Buffer } from '@craftzdog/react-native-buffer';
45
import type { Hash as NativeHash } from './specs/hash.nitro';
56
import type {
67
BinaryLike,

packages/react-native-quick-crypto/src/keys/publicCipher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NitroModules } from 'react-native-nitro-modules';
2+
import { Buffer } from '@craftzdog/react-native-buffer';
23
import type { RsaCipher } from '../specs/rsaCipher.nitro';
34
import type { BinaryLike } from '../utils';
45
import {

packages/react-native-quick-crypto/src/rsa.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NitroModules } from 'react-native-nitro-modules';
2+
import { Buffer } from '@craftzdog/react-native-buffer';
23
import {
34
CryptoKey,
45
KeyObject,

0 commit comments

Comments
 (0)