Home Reference Source

WASM RSA

npm downloads npm

WebAssembly rsa library for generate keys and sign/verify message in nodejs and browsers

Install

npm i wasm-rsa

Examples

webpack 4 example - webpack_four

Docs - Click here

Usage

import RSASetup from 'wasm-rsa'

// Promise syntax
RSASetup().then(rsaInstance => {
  // code...
})

// Async/Await syntax
const rsaInstance = await RSASetup()
// code...

TypeScript

for typescript can import interface

import RSASetup, { RSAInterface } from 'wasm-rsa'

For developers

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