chacha20poly1305

ChaCha20Poly1305 adapter for WebAssembly and JS implementations

Downloads
180
Stars
0
Committers
1

ChaCha20Poly1305

ChaCha20Poly1305 adapter for WebAssembly and JS implementations

npm i @hazae41/chacha20poly1305

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Usage

WebAssembly

npm i @hazae41/chacha20poly1305.wasm
import { ChaCha20Poly1305 } from "@hazae41/chacha20poly1305"
import { ChaCha20Poly1305Wasm } from "@hazae41/chacha20poly1305.wasm"

await ChaCha20Poly1305Wasm.initBundled()

ChaCha20Poly1305.set(ChaCha20Poly1305.fromWasm(ChaCha20Poly1305Wasm))

Noble (JavaScript)

npm i @noble/ciphers
import { ChaCha20Poly1305 } from "@hazae41/chacha20poly1305"
import * as ChaChaNoble from "@noble/ciphers/chacha"

ChaCha20Poly1305.set(ChaCha20Poly1305.fromNoble(ChaChaNoble))