https://github.com/standardnotes/react-native-sodium-jsi
React Native Libsodium JSI Implementation
https://github.com/standardnotes/react-native-sodium-jsi
Last synced: 11 months ago
JSON representation
React Native Libsodium JSI Implementation
- Host: GitHub
- URL: https://github.com/standardnotes/react-native-sodium-jsi
- Owner: standardnotes
- License: agpl-3.0
- Created: 2022-01-27T19:05:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T15:43:41.000Z (over 3 years ago)
- Last Synced: 2025-04-01T18:09:19.702Z (11 months ago)
- Language: C++
- Homepage:
- Size: 20.7 MB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-sodium-jsi
Precompiled binaries of [libsodium](https://libsodium.org) will be linked by default.
Optionally, you can choose to compile libsodium by yourself (run **npm run rebuild** in package directory). Source code will be downloaded and verified before compilation.
Supported Libsodium functions:
- `crypto_aead_xchacha20poly1305_ietf_encrypt`
- `crypto_aead_xchacha20poly1305_ietf_decrypt`
- `crypto_pwhash`
- `crypto_aead_xchacha20poly1305_ietf_keygen`
- `randombytes_buf`
- `randombytes_random`
- `to_base64`
- `from_base64`
### Source compilation
###### General prerequisites
- gpg (macports, homebrew)
- minisign (homebrew)
###### MacOS prerequisites
- libtool (macports, homebrew)
- autoconf (macports, homebrew)
- automake (macports, homebrew)
- Xcode (12 or newer)
###### Android prerequisites
- Android NDK
- CMake
- LLDB
### Recompile and repackage
1. `yarn rebundle`
### Usage
Using hermes on Android is required.
1. `npm install react-native-sodium-jsi`
2. `npx pod-install ios`
3. Run your app.
### Example app
1. `yarn bootstrap`
2. `yarn example`
3. `yarn ios` or `yarn android`