-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a70005
commit b8c8e32
Showing
9 changed files
with
852 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
# XChaCha20-JS | ||
|
||
XChaCha20 implementation in a plain JavaScript. | ||
XChaCha20 implementation in JavaScript (ES6). | ||
|
||
This library will auto generate random nonce and append it to the encrypted message. | ||
|
||
## Usage | ||
|
||
### 1. Import library | ||
```html | ||
<script src="XChaCha20.min.js"></script> | ||
### 1. Download library | ||
```bash | ||
npm i --save @rabbit-company/xchacha20 | ||
``` | ||
|
||
### 2. Encryption | ||
### 2. Import library | ||
```js | ||
import XChaCha20 from "@rabbit-company/xchacha20"; | ||
``` | ||
|
||
### 3. Encryption | ||
```js | ||
XChaCha20.encrypt(message, secretKey); | ||
``` | ||
|
||
### 3. Decryption | ||
### 4. Decryption | ||
```js | ||
XChaCha20.decrypt(message, secretKey); | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.