Socket
Socket
Sign inDemoInstall

sha3

Package Overview
Dependencies
13
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.2.2

5

package.json
{
"name": "sha3",
"version": "1.2.1",
"version": "1.2.2",
"description": "A Node.js C++ extension for SHA-3 (Keccak)",

@@ -30,5 +30,2 @@ "keywords": [

"license": "MIT",
"engines": {
"node": ">= 8.11.1"
},
"dependencies": {

@@ -35,0 +32,0 @@ "nan": "2.10.0"

66

README.md
# A Node.js C++ extension for SHA-3 (Keccak)
This Node.js extension implements the SHA-3 ([Keccak](http://keccak.noekeon.org/)) cryptographic hashing algorithm. It is based on the reference C implementation, version 3.2. The exposed interface is almost identical to that of the `crypto` standard library.
[![Travis CI][3]][4]
[![npm version][5]][6]
[![npm downloads][7]][6]
[![dependencies][8]][9]
[![devDependencies][10]][9]
[![license][11]][12]
[![Build Status](https://travis-ci.org/phusion/node-sha3.svg?branch=master)](https://travis-ci.org/phusion/node-sha3)
This Node.js extension implements the SHA-3 ([Keccak][1]) cryptographic hashing algorithm. It is based on the reference C implementation, version 3.2. The exposed interface is almost identical to that of the `crypto` standard library.
[<img src="http://www.phusion.nl/assets/logo.png">](http://www.phusion.nl/)
[![Phusion][13]][2]
## Installation
npm install sha3
Via `npm`:
```bash
$ npm install sha3
```
Via `yarn`:
```bash
$ yarn add sha3
```
## Usage

@@ -17,13 +32,17 @@

var SHA3 = require('sha3');
```javascript
const SHA3 = require('sha3');
// Generate 512-bit digest.
var d = new SHA3.SHA3Hash();
d.update('foo');
d.digest('hex'); // => "1597842a..."
// Generate 512-bit digest.
let d = new SHA3.SHA3Hash();
d.update('foo');
d.digest('hex');
// => "1597842a..."
// Generate 224-bit digest.
var d = new SHA3.SHA3Hash(224);
d.update('foo');
d.digest('hex'); // => "daa94da7..."
// Generate 224-bit digest.
d = new SHA3.SHA3Hash(224);
d.update('foo');
d.digest('hex');
// => "daa94da7..."
```

@@ -48,3 +67,5 @@ ### new SHA3Hash([hashlen])

npm test
```bash
$ npm test
```

@@ -57,3 +78,3 @@ The test suite is automatically generated from Keccak's reference test suite.

Do not use SHA-3 for hashing passwords. Do not even use SHA-3 + salt for hashing passowords. Use a [slow hash](http://codahale.com/how-to-safely-store-a-password/) instead.
Do not use SHA-3 for hashing passwords. Do not even use SHA-3 + salt for hashing passwords. Use a [slow hash][14] instead.

@@ -63,1 +84,16 @@ ## See also

[Digest::SHA3 for Ruby](https://github.com/phusion/digest-sha3-ruby)
[1]: https://keccak.team/keccak.html
[2]: https://www.phusion.nl/
[3]: https://img.shields.io/travis/phusion/node-sha3/master.svg?label=Travis%20CI
[4]: https://travis-ci.org/phusion/node-sha3
[5]: https://img.shields.io/npm/v/sha3.svg
[6]: https://www.npmjs.com/package/sha3
[7]: https://img.shields.io/npm/dt/sha3.svg
[8]: https://img.shields.io/david/phusion/node-sha3.svg
[9]: https://github.com/phusion/node-sha3/blob/master/package.json
[10]: https://img.shields.io/david/dev/phusion/node-sha3.svg
[11]: https://img.shields.io/github/license/phusion/node-sha3.svg
[12]: https://github.com/phusion/node-sha3/blob/master/LICENSE
[13]: https://www.phusion.nl/images/header/pinwheel_logo.svg
[14]: http://codahale.com/how-to-safely-store-a-password/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc