react-native-sodium-jsi
v1.2.0
Published
React Native JSI Libsodium Implementation
Downloads
26
Readme
react-native-sodium-jsi
Precompiled binaries of libsodium 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
yarn rebundle
Usage
Using hermes on Android is required.
npm install react-native-sodium-jsi
npx pod-install ios
- Run your app.
Example app
yarn bootstrap
yarn example
yarn ios
oryarn android