enigma-hash

1.3.3 • Public • Published
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)
Parameter Description Type Options Default Value
Input Value you want to Hash Any n/a " "
Algorithm Algorithm you want to hash data with String sha256 / sha512 sha256
Code Encoding you want hash to return with String hex / latin1 / base64 hex
Key Key used to encrypt data String Any No 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

/enigma-hash/

    Package Sidebar

    Install

    npm i enigma-hash

    Weekly Downloads

    0

    Version

    1.3.3

    License

    MIT

    Unpacked Size

    2.48 MB

    Total Files

    8

    Last publish

    Collaborators

    • pedreviljoen