Home
last modified time | relevance | path

Searched refs:getRandomBytesAsync (Results 1 – 25 of 26) sorted by relevance

12

/expo/packages/expo-random/src/__tests__/
H A DRandom-test.ts5 getRandomBytesAsync: jest.fn(async () => 0),
13 await expect(Random.getRandomBytesAsync(value));
14 expect(ExpoRandom.getRandomBytesAsync).lastCalledWith(Math.floor(value));
19 ExpoRandom.getRandomBytesAsync = null;
20 await expect(Random.getRandomBytesAsync(1024));
25 await expect(Random.getRandomBytesAsync(-1)).rejects.toThrowError(TypeError);
26 await expect(Random.getRandomBytesAsync(1025)).rejects.toThrowError(TypeError);
27 await expect(Random.getRandomBytesAsync('invalid' as any)).rejects.toThrowError(TypeError);
28 await expect(Random.getRandomBytesAsync(null as any)).rejects.toThrowError(TypeError);
29 await expect(Random.getRandomBytesAsync({} as any)).rejects.toThrowError(TypeError);
[all …]
H A DRandom-test.native.ts6 const value = await Random.getRandomBytesAsync(0);
13 const value = await Random.getRandomBytesAsync(3);
19 await expect(Random.getRandomBytesAsync(0));
20 await expect(Random.getRandomBytesAsync(1024));
21 await expect(Random.getRandomBytesAsync(512.5));
/expo/packages/expo-crypto/src/__tests__/
H A DCrypto-test.ts5 getRandomBytesAsync: jest.fn(async () => 0),
71 await expect(Crypto.getRandomBytesAsync(value));
72 expect(ExpoCrypto.getRandomBytesAsync).lastCalledWith(Math.floor(value));
77 ExpoCrypto.getRandomBytesAsync = null;
78 await expect(Crypto.getRandomBytesAsync(1024));
83 await expect(Crypto.getRandomBytesAsync(-1)).rejects.toThrowError(TypeError);
84 await expect(Crypto.getRandomBytesAsync(1025)).rejects.toThrowError(TypeError);
85 await expect(Crypto.getRandomBytesAsync('invalid' as any)).rejects.toThrowError(TypeError);
86 await expect(Crypto.getRandomBytesAsync(null as any)).rejects.toThrowError(TypeError);
87 await expect(Crypto.getRandomBytesAsync({} as any)).rejects.toThrowError(TypeError);
[all …]
H A DCrypto-test.native.ts22 const value = await Crypto.getRandomBytesAsync(0);
29 const value = await Crypto.getRandomBytesAsync(3);
35 await expect(Crypto.getRandomBytesAsync(0));
36 await expect(Crypto.getRandomBytesAsync(1024));
37 await expect(Crypto.getRandomBytesAsync(512.5));
/expo/packages/expo-random/build/
H A DRandom.js54 export async function getRandomBytesAsync(byteCount) { function
58 if (ExpoRandom.getRandomBytesAsync) {
59 return await ExpoRandom.getRandomBytesAsync(validByteCount);
H A DRandom.d.ts15 export declare function getRandomBytesAsync(byteCount: number): Promise<Uint8Array>;
H A DExpoRandom.web.d.ts4 getRandomBytesAsync(length: number): Promise<Uint8Array>; constant
H A DExpoRandom.web.js10 async getRandomBytesAsync(length) {
H A DRandom.js.map1getRandomBytesAsync(byteCount: number): Promise<Uint8Array> {\n warnIsDeprecated('getRandomBytesA…
H A DExpoRandom.web.js.map1 ….crypto ?? window.msCrypto).getRandomValues(array);\n },\n async getRandomBytesAsync(length: num…
/expo/packages/expo-random/src/
H A DRandom.ts65 export async function getRandomBytesAsync(byteCount: number): Promise<Uint8Array> { function
69 if (ExpoRandom.getRandomBytesAsync) {
70 return await ExpoRandom.getRandomBytesAsync(validByteCount);
H A DExpoRandom.web.ts10 async getRandomBytesAsync(length: number): Promise<Uint8Array> {
/expo/apps/native-component-list/src/screens/
H A DRandomScreen.tsx1 import { getRandomBytes, getRandomBytesAsync } from 'expo-random';
39 const randomAsync = await getRandomBytesAsync(10);
51 <HeadingText>getRandomBytesAsync:</HeadingText>
H A DCryptoScreen.tsx21 name: 'getRandomBytesAsync',
29 actions: Crypto.getRandomBytesAsync,
/expo/packages/expo-crypto/build/
H A DCrypto.js51 export async function getRandomBytesAsync(byteCount) { function
54 if (ExpoCrypto.getRandomBytesAsync) {
55 return await ExpoCrypto.getRandomBytesAsync(validByteCount);
H A DExpoCrypto.web.d.ts7 getRandomBytesAsync(length: number): Promise<Uint8Array>; constant
H A DCrypto.d.ts18 export declare function getRandomBytesAsync(byteCount: number): Promise<Uint8Array>;
H A DExpoCrypto.web.js27 async getRandomBytesAsync(length) {
H A DCrypto.js.map1getRandomBytesAsync(byteCount: number): Promise<Uint8Array> {\n assertByteCount(byteCount, 'getRa…
H A DExpoCrypto.web.js.map1 …h);\n return getCrypto().getRandomValues(array);\n },\n async getRandomBytesAsync(length: num…
/expo/packages/expo-crypto/src/
H A DCrypto.ts57 export async function getRandomBytesAsync(byteCount: number): Promise<Uint8Array> { function
60 if (ExpoCrypto.getRandomBytesAsync) {
61 return await ExpoCrypto.getRandomBytesAsync(validByteCount);
H A DExpoCrypto.web.ts36 async getRandomBytesAsync(length: number): Promise<Uint8Array> {
/expo/apps/test-suite/tests/
H A DRandom.js9 const bytes = await Random.getRandomBytesAsync(length);
/expo/packages/expo-random/
H A DCHANGELOG.md166 - Add a synchronous version of `getRandomBytesAsync` called `getRandomBytes`. ([#9750](https://gith…
/expo/packages/expo-crypto/
H A DCHANGELOG.md70 - Ported over `getRandomBytes`, `getRandomBytesAsync` methods from `expo-random`. ([#20217](https:/…

12