Skip to content

Commit

Permalink
Merge pull request #8 from VirgilSecurity/new-methods
Browse files Browse the repository at this point in the history
v0.3.0
  • Loading branch information
Alexey Smirnov authored Dec 3, 2018
2 parents 4a0e1bd + 3d4f0e7 commit b99b141
Show file tree
Hide file tree
Showing 18 changed files with 20,995 additions and 395 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
.vscode

node_modules
package-lock.json
*.log

.env

.rpt2_cache
.virgil_key_entries
keyknox-storage
.virgil-keyknox-storage
.virgil-local-storage
coverage
dist
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
- "11"
script:
- npm run test
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2018-11-30 0.3.0

* Removed method EThree.boostrap(pwd)
* Method EThree.bootstrap() renamed to EThree.register()
* New method EThree.rotatePrivateKey() - used in case you lost your private key
* New method EThree.restorePrivateKey(pwd) - used to fetch private key from Virgil Cloud
* New method EThree.hasLocalPrivateKey() - used to check for private key existence on a device

## 2018-11-20 0.2.0

* Rename EThree.init method to EThree.initialize
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You will need to add `@virgilsecurity/e3kit` script.

## Usage Example

### Initialize & Bootstrap
### Initialize & Register

```
import { EThree } from '@virgilsecurity/e3kit-js'
Expand All @@ -47,7 +47,8 @@ const getToken = () => fetch('http://localhost:3000/get-virgil-jwt/')
// get your unique identity from backend
const sdk = await EThree.initialize(getToken);
// create private key and upload it to our protected cloud service
await sdk.bootstrap('secret_password');
await sdk.register();
await sdk.backupPrivateKey('encryption_pwd');
```

### Encrypt & Decrypt
Expand Down
3 changes: 1 addition & 2 deletions example/firebase/snippets/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ let eThree;
firebase.auth().signInAnonymously()
// Once Firebase user authenticated, we waiting for eThree client initialization
.then(() => eThreePromise)
// Bootstrap user (i.e. load user's private key)
.then(client => {
eThree = client;
eThree.bootstrap('password');
eThree.register();
return eThree;
})
// Lookup destination user public keys
Expand Down
Loading

0 comments on commit b99b141

Please sign in to comment.