Socket
Book a DemoInstallSign in
Socket

ecies-ed25519-wasm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecies-ed25519-wasm

A WASM binding for ecies-ed25519

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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;

Keywords

ed25519

FAQs

Package last updated on 10 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts