Virgil E3Kit SDK is also available on other platforms:
Install @virgilsecurity/e3kit-native
npm install @virgilsecurity/e3kit-native
Also you need to install several mandatory dependencies that aren't bundled in the package:
- react-native-virgil-crypto - Virgil Crypto Library for React Native.
- @react-native-community/async-storage - storage backend for group chats.
- @virgilsecurity/key-storage-rn - storage adapter for React Native.
- react-native-keychain - storage backend for @virgilsecurity/key-storage-rn.
Tip: carefully follow the installation guides of each library to avoid problems in future.
import AsyncStorage from '@react-native-community/async-storage';
import { EThree } from '@virgilsecurity/e3kit-native';
// Promise
EThree.initialize(tokenCallback, { AsyncStorage })
.then(eThree => {
// register user, encrypt, decrypt, etc.
});
// async/await
const eThree = await EThree.initialize(tokenCallback, { AsyncStorage });
// register user, encrypt, decrypt, etc.
You need to explicitly pass
AsyncStorage
implementation to E3Kit. Otherwise an app will crash.
You can find detailed guides on library usage here.
This library is released under the 3-clause BSD License.
Our developer support team is here to help you. Find out more information on our Help Center.
You can find us on Twitter or send us email support@VirgilSecurity.com.
Also, get extra help from our support team on Slack.