You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix EOF line ending in .gitignore
- Add react-native-nitro-modules to all installation instructions
- Update performance claims from '58x' to 'hundreds of times faster'
- Reframe JSI mentions to focus on Nitro Modules architecture
- Add libsodium/xsalsa20 configuration documentation
Copy file name to clipboardExpand all lines: docs/content/docs/introduction/complete-setup.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,3 +197,19 @@ yarn start --reset-cache
197
197
</Tab>
198
198
199
199
</Tabs>
200
+
201
+
## XSalsa20 Support (Optional)
202
+
203
+
If you need to use the `xsalsa20` cipher algorithm, you must enable libsodium support by setting an environment variable **before building your native code**:
204
+
205
+
```bash
206
+
export RN_QUICK_CRYPTO_LIBSODIUM=1
207
+
```
208
+
209
+
This can be done:
210
+
-**iOS**: Set in your Xcode build settings or in a pre-build script
211
+
-**Android**: Add to your `gradle.properties` or as a build environment variable
212
+
213
+
<Callouttype="warn">
214
+
Without this flag, attempting to use `xsalsa20` will throw a runtime error: `"libsodium must be enabled to use this cipher"`
Copy file name to clipboardExpand all lines: docs/content/docs/introduction/what-is-rnqc.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ React Native has historically lacked a robust, high-performance cryptographic st
15
15
16
16
**RNQC was created because complex apps need a FULL, INDEPENDENT cryptographic standard.**
17
17
18
-
We wanted a complete, standalone cryptographic library for React Native where you can simply call `install()` to polyfill the environment, ensuring all your cryptographic operations run smoothly and **up to 58x faster** than standard JS solutions.
18
+
We wanted a complete, standalone cryptographic library for React Native where you can simply call `install()` to polyfill the environment, ensuring all your cryptographic operations run smoothly and **hundreds of times faster** than standard JS solutions.
19
19
20
20
<Callouttype="info"title="Built by Margelo">
21
21
This library was built at **Margelo**, an elite app development agency, specifically to power high-performance crypto apps and wallets.
@@ -29,8 +29,8 @@ We wanted a complete, standalone cryptographic library for React Native where yo
29
29
We believe improved performance shouldn't require code rewrites.
30
30
RNQC implements the **exact** Node.js API surface. If you know Node `crypto`, you know RNQC. There is zero learning curve.
31
31
32
-
### 2. Performance First (JSI)
33
-
We bypass the "Bridge". All operations communicate directly with C++ via the **JavaScript Interface (JSI)**.
32
+
### 2. Performance First (Nitro Modules)
33
+
We bypass the "Bridge". All operations communicate directly with C++ via **Nitro Modules**, a modern architecture built on top of JSI (JavaScript Interface).
34
34
Heavy tasks (like `pbkdf2` or key generation) are offloaded to a dedicated native thread pool to ensure your UI **never freezes**, even during intensive encryption.
35
35
36
36
### 3. Secure Defaults
@@ -40,18 +40,18 @@ We don't roll our own crypto. All primitives map directly to the platform-native
40
40
41
41
## Architecture
42
42
43
-
RNQC bridges the gap between the JavaScript world and native C++ performance using JSI.
43
+
RNQC bridges the gap between the JavaScript world and native C++ performance using **Nitro Modules**.
C -->|Direct Memory Access| O[OpenSSL / Native Crypto]
49
49
O -->|Result| C
50
50
C -->|Return Value| JS
51
51
```
52
52
53
-
### The JSI Advantage
54
-
Unlike the legacy Bridge, which relies on asynchronous JSON message passing (slow, serializable-only), **JSI (JavaScript Interface)** allows C++ code to expose "Host Objects" directly to the JavaScript runtime.
53
+
### Nitro Modules Architecture
54
+
Unlike the legacy Bridge, which relies on asynchronous JSON message passing (slow, serializable-only), **Nitro Modules** provides a modern architecture built on JSI (JavaScript Interface), allowing C++ code to expose "Hybrid Objects" directly to the JavaScript runtime.
55
55
1.**Zero Serialization**: Data (like `ArrayBuffer`) is shared by reference. No cloning large buffers.
56
56
2.**Synchronous Execution**: Methods like `randomBytes` or `update` run instantly, just like native JS functions.
57
57
3.**Thread Safety**: Heavy operations automatically offload to a C++ thread pool to prevent UI jank.
0 commit comments