npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

insanehash

v0.1.4

Published

Use the lastest SHA3 cryptographic hash algorithm from NIST Hash Competition based on Chris Drost implementation

Downloads

8

Readme

InsaneHash

Since: 10/07/2011
Author: Thales Pinheiro

Abstraction

InsaneHash implements the lastest SHA3 cryptographic hash algorithms from NIST Hash Competition[1] including the winner (Keccak)[2] based on the Chris Drost works.

Features

  • Fast algorithms with low footprint
  • Choose your flavor:
    • Keccak, by Bertoni, Daemen, Peeters, and van Assche
    • BLAKE, by Aumasson, Henzen, Meier, and Phan
    • BMW (Blue Midnight Wish), by Gligoroski, Klima, Knapskog, El-Hadedy, Amundsen, and Mjølsnes
    • CubeHash, by Dan Bernstein.
    • Shabal, by Bresson, Canteaut, Chevalier-Mames, Clavier, Fuhr, Gouget, Icart, Misarsky, Plasencia, Paillier, Pornin, Reinhard, Thuillet, and Videau
    • Skein, by Bellare, Callas, Ferguson, Kohno, Lucks, Schneier, Walker, and Whiting
    • Half Skein, a 32-bit Skein-256-256 (non-compliant) version

Installation

  • Package npm install insanehash --save
  • CLI npm install -g insanehash

Utilization

Package

  1. Require the module var ih = require('insanehash');
  2. Calling each algorithm will return the hash:
  • ih.blake32('Hi!');
    • ceb42cb8ab21fe511b85ecd74933b9f4aafa4d1c67da0778b69e375245942314
  • ih.shabal('Hi!');
    • 0427065214b9a8ea2d79c73a1a2d02ea3f9c4f71d4c73a30ad2c0bc8b1c172d9
  • ih.bmw('Hi!');
    • 44fe7f399277b09b8e892a80522b833703abacd5fc7f71da6db96999ca4bdb06
  • ih.skein('Hi!');
    • 6dbe952ab5ec3bf45a82887953953e3220e1eab7ae9069ae548ac8561691378993210ca0cb0666656614ef858fca9893a9bb6fe149dca792c910d6518aecdd30
  • ih.cubehash('Hi!');
    • a206bffa3c77a6410270f061e6b264fd79d1a997c06d444ee1bba42cff2b66d3
  • ih.halfskein('Hi!');
    • 39edf053bf6be95f1af2476f83fbf9b71fa0e3188361def18c879a9f09370f8a
  • ih.keccak('Hi!');
    • 22dd5d47d9cb35a05e3022a7bac1a39547da7b303aba89cbe9205046d1f0762c

CLI

  1. insanehash -b 'Hi!'
    • ceb42cb8ab21fe511b85ecd74933b9f4aafa4d1c67da0778b69e375245942314'
  2. insanehash --blake32 'Hi!'
    • ceb42cb8ab21fe511b85ecd74933b9f4aafa4d1c67da0778b69e375245942314'

Notes:

  • Use single quotes for the text!
  • insanehash -h check all available options
  • insanehash -v check the version

Tests

Clone this repository and choose your flavor (GNU Make, NPM or direct):

  • To run both CLI and package tests:
    • make test
    • npm run test
  • To run only CLI tests:
    • make testCLI
    • npm run test:cli
    • ./test.sh
    • sh test.sh
  • To run only package tests:
    • make testPackage
    • npm run test:package
    • ./node_modules/mocha/bin/mocha test.js

Notes:

  • test.sh should be 755. If don't just run chmod a+x test.sh
  • make requires GNU Make
  • package test requires Mocha