Socket
Socket
Sign inDemoInstall

crypto-hashing

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-hashing - npm Package Compare versions

Comparing version 0.3.1 to 1.0.0

index.js

11

CHANGELOG.md

@@ -0,1 +1,5 @@

1.0.0 / 2016-03-30
------------------
- changed interface. See [#2][#2]
0.3.1 / 2014-04-19

@@ -12,2 +16,7 @@ ------------------

------------------
* added method `sha256ripe160`
* added method `sha256ripe160`
<!--- extract functions from bitcoinjs-lib [enhancement] -->
[#2]: https://github.com/cryptocoinjs/crypto-hashing/pull/2
<!--- Make options optional for sha256ripe160 -->
[#1]: https://github.com/cryptocoinjs/crypto-hashing/pull/1

49

package.json
{
"name": "crypto-hashing",
"version": "0.3.1",
"description": "Easy interfaces for cryptographic hash functions",
"version": "1.0.0",
"description": "Hash functions for bitcoin and other cryptocurrencies",
"keywords": [
"cryptography",
"hashing"
"hash160",
"hash256",
"ripemd160",
"sha1",
"sha256",
"sha512",
"bitcoin",
"cryptocurrency",
"hash"
],
"main": "./lib/hashing.js",
"homepage": "https://github.com/cryptocoinjs/crypto-hashing",
"bugs": {
"url": "https://github.com/cryptocoinjs/crypto-hashing/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "./index.js",
"repository": {
"type": "git",
"url": "https://github.com/cryptocoinjs/crypto-hashing"
},
"scripts": {
"lint": "standard",
"test": "npm run lint && npm run unit",
"unit": "tape test/*.js"
},
"dependencies": {
"binstring": "0.2.x",
"ripemd160": "~0.2.0"
"create-hash": "^1.1.2"
},
"devDependencies": {
"mocha": "1.*",
"mochify": "~0.4.2"
},
"repository": {
"url": "https://github.com/cryptocoinjs/crypto-hashing",
"type": "git"
},
"author": "Brooks Boyd <boydb@midnightdesign.ws>"
"hash-test-vectors": "^1.3.2",
"standard": "^6.0.8",
"tape": "^4.5.1"
}
}

@@ -1,29 +0,26 @@

# Crypto Hashing
# crypto-hashing
Provides a common interface for cryptographic hash functions commonly used in cryptocoin protocols.
[![NPM Package](https://img.shields.io/npm/v/crypto-hashing.svg?style=flat-square)](https://www.npmjs.org/package/crypto-hashing)
[![Build Status](https://img.shields.io/travis/cryptocoinjs/crypto-hashing.svg?branch=master&style=flat-square)](https://travis-ci.org/cryptocoinjs/crypto-hashing)
[![Dependency status](https://img.shields.io/david/cryptocoinjs/crypto-hashing.svg?style=flat-square)](https://david-dm.org/cryptocoinjs/crypto-hashing#info=dependencies)
## Usage
If only interested in sub-set of hashes, reference just that function of the exported module:
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
```js
var sha256 = require('crypto-hashing').sha256;
###### Available functions:
console.log(sha256('hello'));
console.log(sha256.x2('hello'));
```
In addition to functions from [crypto-browserify/createHash](https://github.com/crypto-browserify/createHash):
- hash160 (sha256 and then ripemd160)
- hash256 (sha256 twice)
Or reference the whole module for all the functions:
###### Example
```js
var hash = require('crypto-hashing');
console.log(hash.sha256('hello'));
console.log(hash.ripemd160('hello'));
var cryptoHash = require('crypto-hashing')
var buffer = new Buffer('Hello there!')
console.log(cryptoHash('hash256', buffer).toString('hex'))
// e365181d0a42d3f57906af24c80d4636158455d140734c85e80609fa7d100300
```
## Test
## License
Unit tests are written in [Mocha](http://visionmedia.github.io/mocha/). To run the test suite, install mocha either by installing it globally or installing the development dependencies with NPM. Then, from within the project's folder run `mocha`.
MIT
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