Code Monkey home page Code Monkey logo

checksum's Introduction

Checksum

Checksum utility for node.

Status

build status

Install

npm install checksum

Usage

var checksum = require('checksum')
  , cs = checksum('dshaw')

if (cs === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
  console.log('yay')
}

checksum.file('dshaw.txt', function (err, sum) {
   if (cs === '9b8cebc0421241d087f6ab7e815285af803de7e7') {
     console.log('yay yay')
   }
})

Checksum cli tool

npm install -g checksum

Options

  • -a --algorithm: default sha1
  • -v --verbose: default false

Usage

$ echo -n dshaw | checksum
> 9b8cebc0421241d087f6ab7e815285af803de7e7

$ checksum ./*
> c86d703371777a96ef7cdbb6a8fe65afb8e95d94  ./History.md
> 6d8afb5a7e0bf476e966a9b741057ba712ba067a  ./Readme.md
> 09f5ad81b312fe59619fbfbfd5b3785deb9b0e88  ./checksum.js
> 47396881ce59853d53766ad701c13b0a107a8d6c  ./package.json

$ checksum -a md5 ./test/*
> e54ea1240678c34901b150609e9b1906  ./test/checksum.test.js

$ checksum -a sha256 ./bin/*
> f1e3209ff36988ffb136414d4d582052d901d0f3019c3d133731bcd751761c23  ./bin/checksum-cli.js

checksum's People

Contributors

dshaw avatar notmyself avatar kurmanka avatar

Watchers

James Cloos avatar Jake Gardner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.