If all goes well, you should see messages printed below in a moment...
12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/ionic/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. 13 | -------------------------------------------------------------------------------- /examples/ReactNativeSample/ios/ReactNativeSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #importIf all goes well, you should see messages printed below in a moment...
13 |{{ message }}
15 || <%= link.title %> | 29 |v<%= link.version %> |
30 |
[Virgil Security](https://virgilsecurity.com) provides [Virgil E3Kit](https://virgilsecurity.com/e3kit/) - an open-source client-side framework that allows developers to add end-to-end encryption to their messaging applications, file sharing programs, and other digital communication products in just a few simple steps to become HIPAA and GDPR compliant and more.
13 |
14 | ## Benefits
15 |
16 | - Easy to setup and integrate into new or existing projects
17 | - Compatible with any CPaaS provider, including Nexmo, Firebase, Twilio, PubNub and etc.
18 | - Strong secret keys storage, integration with all platform-specific storages
19 | - Provides GDPR and HIPAA compliance
20 | - Immune to quantum computers attacks
21 |
22 | ## Features
23 |
24 | - Strong one-to-one and group encryption
25 | - Files end-to-end encryption (for browser and React Native)
26 | - Data signature and verification as part of the encrypt and decrypt functions
27 | - Recoverable private encryption keys
28 | - Access to encrypted data from multiple user devices
29 |
30 | ## Installation
31 |
32 | Navigate to our [Developer Documentation](https://developer.virgilsecurity.com/docs/e3kit/get-started/setup-client/) to install and initialize Virgil E3Kit.
33 |
34 | Virgil E3Kit JS is provided in separate packages for different platforms:
35 |
36 | | Name | Description |
37 | | :--- | :---------- |
38 | | [e3kit-browser](/packages/e3kit-browser) | For use in web browsers. |
39 | | [e3kit-native](/packages/e3kit-native) | For use in React Native. |
40 | | [e3kit-node](/packages/e3kit-node) | For use in Node.js and Electron. |
41 |
42 | ## Resources
43 |
44 | - [E3Kit Product Page](https://virgilsecurity.com/e3kit/)
45 | - [E3Kit Documentation](https://developer.virgilsecurity.com/docs/e3kit/) - start integrating E3Kit into your project with our detailed guides.
46 | - [E3Kit TypeScript/JavaScript API Reference](https://virgilsecurity.github.io/virgil-e3kit-js/) - E3Kit API reference for the language of your choice.
47 | - [Quickstart Demo](https://developer.virgilsecurity.com/docs/e3kit/get-started/quickstart/) - will help you to get started with the Virgil E3Kit quickly, and to learn some common ways to build end-to-end encryption between two fictional characters Alice and Bob.
48 |
49 | ## Samples
50 |
51 | You can find examples for React Native, Webpack, Ionic, Node and UMD in the [examples folder](/examples), at our [Developer Documentation](https://developer.virgilsecurity.com/docs/e3kit/) and in the [E3kit Web Demo](https://github.com/VirgilSecurity/demo-e3kit-web).
52 |
53 | ## License
54 |
55 | This library is released under the [3-clause BSD License](LICENSE).
56 |
57 | ## Support
58 |
59 | Our developer support team is here to help you. Find out more information on our [Help Center](https://help.virgilsecurity.com/).
60 |
61 | You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email support@VirgilSecurity.com.
62 |
63 | Also, get extra help from our support team on [Slack](https://virgilsecurity.com/join-community).
64 |
65 | ## Troubleshooting
66 |
67 | ### Webpack
68 |
69 | Make sure you're following a similar approach to the [webpack example](/examples/webpack) and pay special attention to the webpack.config.js file.
70 |
--------------------------------------------------------------------------------
/packages/e3kit-browser/README.md:
--------------------------------------------------------------------------------
1 | # Virgil E3Kit SDK for Browsers
2 | Virgil E3Kit SDK is also available on other platforms:
3 | - [Node.js](https://github.com/VirgilSecurity/virgil-e3kit-js/tree/master/packages/e3kit-node)
4 | - [React Native](https://github.com/VirgilSecurity/virgil-e3kit-js/tree/master/packages/e3kit-native)
5 |
6 | > E3Kit's underlying crypto library is compiled to WebAssembly. You need to make sure your target browsers [support WebAssembly](https://caniuse.com/#search=WebAssembly). We also have asm.js fallback for environments that don't support WebAssembly. The downside of it is much slower download and execution time.
7 |
8 | ## Install
9 | - npm:
10 | ```sh
11 | npm install @virgilsecurity/e3kit-browser
12 | ```
13 | - yarn:
14 | ```sh
15 | yarn add @virgilsecurity/e3kit-browser
16 | ```
17 | - UMD:
18 |
19 | **WebAssembly**
20 | ```html
21 |
22 | ```
23 |
24 | **asm.js** (Use this only if your target environments don't support WebAssembly)
25 | ```html
26 |
27 | ```
28 |
29 | ## Use
30 | - npm:
31 |
32 | **WebAssembly**
33 |
34 | ```javascript
35 | import { EThree } from '@virgilsecurity/e3kit-browser';
36 |
37 | // Promise
38 | EThree.initialize(tokenCallback)
39 | .then(eThree => {
40 | // register user, encrypt, decrypt, etc.
41 | });
42 |
43 | // async/await
44 | const eThree = await EThree.initialize(tokenCallback);
45 | // register user, encrypt, decrypt, etc.
46 | ```
47 |
48 | **asm.js** (Use this only if your target environments don't support WebAssembly)
49 | ```javascript
50 | import { EThree } from '@virgilsecurity/e3kit-browser/dist/browser.asmjs.es';
51 |
52 | // Promise
53 | EThree.initialize(tokenCallback)
54 | .then(eThree => {
55 | // register user, encrypt, decrypt, etc.
56 | });
57 |
58 | // async/await
59 | const eThree = await EThree.initialize(tokenCallback);
60 | // register user, encrypt, decrypt, etc.
61 | ```
62 |
63 | - UMD:
64 | ```html
65 |
78 | ```
79 |
80 | ## Encrypt & decrypt large files
81 |
82 | See the following methods if you need to encrypt & decrypt large files with the best speed/browser performance ratio:
83 | - [authEncryptFile](https://virgilsecurity.github.io/virgil-e3kit-js/e3kit-browser/classes/ethree.html#authencryptfile)
84 | - [authDecryptFile](https://virgilsecurity.github.io/virgil-e3kit-js/e3kit-browser/classes/ethree.html#authdecryptfile)
85 |
86 | Both methods take an instance of `File` class as input instead of binary `ArrayBuffer`.
87 | The files are encrypted in small chunks, so it doesn't block the main thread and it returns an encrypted instance of `File`. The chunk size by default is 64kb which produces the best speed/browser performance ratio, but it can be changed. Larger chunk size speeds up encryption but can cause browser lags.
88 |
89 | The code sample can be found [here](https://github.com/VirgilSecurity/virgil-e3kit-js/blob/master/examples/authEncryptFile.html).
90 |
91 | > This approach for file encryption is currently only supported in browser environments and mobile apps built with the Ionic framework.
92 |
93 | ## Further reading
94 | You can find detailed guides on library usage [here](https://github.com/VirgilSecurity/virgil-e3kit-js#resources).
95 |
96 | ## License
97 | This library is released under the [3-clause BSD License](LICENSE).
98 |
99 | ## Support
100 | Our developer support team is here to help you. Find out more information on our [Help Center](https://help.virgilsecurity.com).
101 |
102 | You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email support@VirgilSecurity.com.
103 |
104 | Also, get extra help from our support team on [Slack](https://virgilsecurity.com/join-community).
105 |
--------------------------------------------------------------------------------
/examples/create-react-app/README.md:
--------------------------------------------------------------------------------
1 | # Virgil E3Kit SDK for Browsers + [Create React App](https://github.com/facebook/create-react-app)
2 |
3 | ## Notable changes
4 | - Add [react-app-rewired](https://github.com/timarney/react-app-rewired)
5 | - Add [config-overrides.js](config-overrides.js)
6 |
7 | ## License
8 | This library is released under the [3-clause BSD License](LICENSE).
9 |
10 | ## Support
11 | Our developer support team is here to help you. Find out more information on our [Help Center](https://help.virgilsecurity.com).
12 |
13 | You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email support@VirgilSecurity.com.
14 |
15 | Also, get extra help from our support team on [Slack](https://virgilsecurity.com/join-community).
16 |
17 | --------
18 |
19 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
20 |
21 | ## Get Started
22 |
23 | 1. Configure and start the server in the `examples/backend` folder following instructions in `../examples/backend/README.md`.
24 | 2. Install dependencies with [Yarn](https://yarnpkg.com/en/)
25 | ```sh
26 | yarn install
27 | ```
28 | > You need to use Yarn because we use [Workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) in this repository :)
29 | 3. Create `.env` file. Use `.env.example` as a reference.
30 | 4. Run the following command to start the demo
31 | ```sh
32 | yarn start
33 | ```
34 | > ⚠️ If you see `Cannot find module '@virgilsecurity/e3kit-browser'` Error, make sure you did `yarn install` in the root folder
35 |
36 | ## Available Scripts
37 |
38 | In the project directory, you can run:
39 |
40 | ### `yarn start`
41 |
42 | Runs the app in the development mode.