New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hivecrypt

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hivecrypt

A small JavaScript module for Hive memo encryption and decryption

  • 2.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-84.44%
Maintainers
0
Weekly downloads
 
Created
Source

Hivecrypt

A small JavaScript module for Hive memo encryption and decryption.

Adapted from this pull request that was never merged into dhive. Implemented using Crypto-JS such that it is compatible with all JavaScript environments including Electron JS apps.

Why was this created?

I needed a way to encrypt and decrypt messages using Hive posting keys in Electron apps, however the methods provided by hive-js are not supported in those environments due to the usage of libraries that are only available in Node JS and browsers natively.

Installation

Node JS
npm i hivecrypt

Then import it as a module with const hivecrypt = require('hivecrypt').

Browser

Include in HTML:

<script src="https://unpkg.com/hivecrypt/bin/hivecrypt.min.js"></script>

The Hivecrypt methods will be accessible through window.hivecrypt.

Usage

Encrypt a memo
let encrypted = hivecrypt.encode('5Jprivatekey1','STMpublickey2','#messageToEncrypt')
console.log(encrypted)
Decrypt a memo
let decrypted = hivecrypt.decode('5privatekey','#encryptedMessage')
console.log(decrypted)
Generate a random WIF-encoded private key
let randomWif = hivecrypt.randomWif()
console.log(randomWif) // 5JBBPcSkrsvmAmvmex9aC4NNGvZsU87eePzpbFpD9PZRtgGoBKh

Keywords

FAQs

Package last updated on 14 Jul 2024

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc