XChaCha20 implementation in a plain JavaScript.
This library will auto generate random nonce and append it to the encrypted message.
<script src="XChaCha20.min.js"></script>
XChaCha20.encrypt(message, secretKey);
XChaCha20.decrypt(message, secretKey);