/XChaCha20-JS

XChaCha20 implementation in a plain JavaScript

Primary LanguageJavaScriptMIT LicenseMIT

XChaCha20-JS

XChaCha20 implementation in a plain JavaScript.

This library will auto generate random nonce and append it to the encrypted message.

Usage

1. Import library

<script src="XChaCha20.min.js"></script>

2. Encryption

XChaCha20.encrypt(message, secretKey);

3. Decryption

XChaCha20.decrypt(message, secretKey);