Socket
Socket
Sign inDemoInstall

node-libhydrogen-binding

Package Overview
Dependencies
100
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-libhydrogen-binding

Bindings for libhydrogen


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

EXPERIMENTAL: node-libhydrogen-binding

Build Status

libhydrogen native bindings for Node.js

Work in progress! This package brings the easy-to-use encryption library libhydrogen to Node.js.

Usage example

Install node-libhydrogen-binding as any other package:

npm install node-libhydrogen-binding

You can use it for encrypting and decrypting payload:

const hydrogen = require('node-libhydrogen-binding');
hydrogen.init();

const msg = "message";
const key = hydrogen.secretbox_keygen();
const msgId = 0;
const context = "testtest";

// encrypt
const ciphertext = hydrogen.secretbox_encrypt(msg, key, msgId, context);

// decrypt
const plaintext = hydrogen.secretbox_decrypt(ciphertext, key, msgId, context)

API Documentation

Check the wiki

Building

  • git submodule update --init
  • npm install --global --production windows-build-tools (windows only)
  • npm run build

License

ISC, same as libhydrogen.

FAQs

Last updated on 18 Nov 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc