ChaCha20Poly1305 adapter for WebAssembly and JS implementations
npm i @hazae41/chacha20poly1305
- 100% TypeScript and ESM
- No external dependencies
npm i @hazae41/chacha20poly1305.wasm
import { ChaCha20Poly1305 } from "@hazae41/chacha20poly1305"
import { ChaCha20Poly1305Wasm } from "@hazae41/chacha20poly1305.wasm"
await ChaCha20Poly1305Wasm.initBundled()
ChaCha20Poly1305.set(ChaCha20Poly1305.fromWasm(ChaCha20Poly1305Wasm))
npm i @noble/ciphers
import { ChaCha20Poly1305 } from "@hazae41/chacha20poly1305"
import * as ChaChaNoble from "@noble/ciphers/chacha"
ChaCha20Poly1305.set(ChaCha20Poly1305.fromNoble(ChaChaNoble))