0.1.1 • Published 6 years ago

@buttercup/wasmcane v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

WasmCane NPM version Build Status

A library that provides fast cryptography tools to be used in iocane library (in JavaScript).

Background

We use iocane in Buttercup for cryptography, and it uses built-in encryption tools of Node.js or any Browser environment that it runs in. Usually those tools are not fast or consistent enough and can't be trusted in data-sensitive projects like Buttercup where the margin of error is so little. So we decided to write the encryption tools in Rust and use them through WASM for fast and reliable cryptography.

Install and Usage

$ npm install @buttercup/wasmcane

And later in your JS code:

import { pbkdf2_derive } from "@buttercup/wasmcane";

Make sure you are using Webpack 4.8+ because it needs to handle WASM binaries.

Building

You have to have the following tools installed:

Testing

Run cargo test to run all tests

Packaging and Publishing to NPM

Once you have installed wasm-pack you can:

$ wasm-pack init --scope buttercup
$ wasm-pack publish

Be sure that you have updated the correct version in Cargo.toml

License

This software is released under the MIT License.

This repository includes a copy of rust-cardano which is also released under the MIT License.