Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enigma-hash

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enigma-hash

Demystifying the hashing of data

  • 1.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
Compression

enigma-hash

Package version Make a pull request LicenseCircleCI npm downloads code style: prettier Greenkeeper badge CodeFactor

Demystifying hashing, made simple and easy

Contents

Install

yarn add enigma-hash

OR

npm install enigma-hash

Usage

Require in the module

const { hash } = require('enigma-hash')

Hash like below:

const hashValue = hash('Hello World', 'sha256', 'hex')

// hash(input, algorithm, code)

Hash with a key (Hmac) like below:

const hashValue = hash('Hello World', 'sha256', 'hex', 'Some key')

// hash(input, algorithm, code, key)
ParameterDescriptionTypeOptionsDefault Value
InputValue you want to HashAnyn/a" "
AlgorithmAlgorithm you want to hash data withStringsha256 / sha512sha256
CodeEncoding you want hash to return withStringhex / latin1 / base64hex
KeyKey used to encrypt dataStringAnyNo key

CLI Tool

Install with:

npm install -g enigma-hash

& simply run with the following:

enigma --alg sha256 --code hex --data <some string to hash>

Contribute

Contributions are welcome!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

MIT

Keywords

FAQs

Package last updated on 31 Aug 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

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