Socket
Socket
Sign inDemoInstall

@pushrocks/smarthash

Package Overview
Dependencies
14
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pushrocks/smarthash

simplifies access to node hash functions


Version published
Maintainers
1
Created

Readme

Source

nodehash

simplifies access to node hash functions. TypeScript Ready

Status

build status

Usage

We recommend the use of TypeScript for best in class intellisense.

import * as nodehash from "nodehash";

// from stream
let readStream = fs.createReadStream("./somefile.txt")
nodehash.sha256FromStream(readStream)
    .then((resultString){
        console.log(resultString); // prints hash of the file
    });

// from file
nodehash.sha256FromFile("./somefile.txt")
    .then((resultString){
        console.log(resultString); // prints hash of the file
    });

// from string
nodehash.sha256FromString("some weird random string")
    .then((resultString){
        console.log(resultString); // prints hash of the file
    });

let hashString = nodehash.sha256FromStringSync("some weird random string");

Keywords

FAQs

Last updated on 07 Sep 2018

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc