@hazae41/chacha20poly1305
v1.0.8
Published
ChaCha20Poly1305 adapter for WebAssembly and JS implementations
Downloads
71
Maintainers
Readme
ChaCha20Poly1305
ChaCha20Poly1305 adapter for WebAssembly and JS implementations
npm i @hazae41/chacha20poly1305
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))