ecies-ed25519-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

ecies-ed25519-wasm

A WASM binding for ecies-ed25519.

Install

npm install ecies-ed25519-wasm

Usage

import * as ed25519 from "ecies-ed25519-wasm";

const data = Uint8Array.from([1, 2, 3, 4]);
const [sk, pk] = ed25519.generate_keypair();

const encrypted = ed25519.encrypt(pk, data);
const decrypted = ed25519.decrypt(sk, encrypted);

alert("ed25519 decrypted: " + decrypted);

Check this example for more details.

API

function generate_keypair(): Array<any>;
function encrypt(receiver_pub: Uint8Array, msg: Uint8Array): Uint8Array | undefined;
function decrypt(receiver_sec: Uint8Array, msg: Uint8Array): Uint8Array | undefined;

Readme

Keywords

Package Sidebar

Install

npm i ecies-ed25519-wasm

Weekly Downloads

7

Version

0.0.1

License

MIT

Unpacked Size

164 kB

Total Files

7

Last publish

Collaborators

  • kigawas