WebAssembly rsa library for generate keys and sign/verify message in nodejs and browsers
npm i wasm-rsa
webpack 4 example - webpack_four
Docs - Click here
import RSASetup from 'wasm-rsa'
// Promise syntax
RSASetup().then(rsaInstance => {
// code...
})
// Async/Await syntax
const rsaInstance = await RSASetup()
// code...
for typescript can import interface
import RSASetup, { RSAInterface } from 'wasm-rsa'
install rust
curl https://sh.rustup.rs -sSf | sh
rustup target add wasm32-unknown-unknown
cargo check --target wasm32-unknown-unknown
install wasm-pack cli
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh;
clone repo
git clone https://github.com/Harzu/wasm-rsa.git
build
npm run build
Run test
npm run test