Is there any way to get argon2 working on cloudflare workers with typescript?

I know there is a package written in rust for this but wondering if there’s any way to make it work in typescript on cloudflare workers The rust package works but it requires a separate deployment which is not ideal For example I can’t seem to have @node-rs/argon2 work with cloudflare workers
2 Replies
James
James2mo ago
I'm not aware of any pure JS argon2 implementations, but you can use Rust for this, yeah. You could bundle it into your existing worker, or try something like https://github.com/ComicScrip/hash-wasm-edge - I've not tried this, but it looks promising.
GitHub
GitHub - ComicScrip/hash-wasm-edge: Lightning fast hash functions u...
Lightning fast hash functions using hand-tuned WebAssembly binaries - ComicScrip/hash-wasm-edge
Paul
PaulOP3w ago
This one ended up working great. Thanks

Did you find this page helpful?