Socket
Socket
Sign inDemoInstall

sha3

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sha3

A Node.js C++ extension for SHA-3 (Keccak)


Version published
Weekly downloads
169K
increased by16.79%
Maintainers
3
Weekly downloads
 
Created

What is sha3?

The sha3 npm package provides implementations of the SHA-3 (Secure Hash Algorithm 3) cryptographic hash functions. It allows you to generate hash digests for data, which can be used for data integrity checks, digital signatures, and other cryptographic applications.

What are sha3's main functionalities?

Generate SHA-3 Hash

This feature allows you to generate a SHA-3 hash for a given input string. In this example, a SHA-3 hash with a 256-bit output is generated for the string 'hello world'.

const { SHA3 } = require('sha3');
const hash = new SHA3(256);
hash.update('hello world');
console.log(hash.digest('hex'));

Generate SHAKE128 Hash

This feature allows you to generate a SHAKE128 hash, which is an extendable-output function (XOF) variant of SHA-3. In this example, a SHAKE128 hash is generated for the string 'hello world' with a 128-bit output.

const { SHAKE } = require('sha3');
const hash = new SHAKE(128);
hash.update('hello world');
console.log(hash.digest({ buffer: Buffer.alloc(16) }).toString('hex'));

Generate SHAKE256 Hash

This feature allows you to generate a SHAKE256 hash, another XOF variant of SHA-3. In this example, a SHAKE256 hash is generated for the string 'hello world' with a 256-bit output.

const { SHAKE } = require('sha3');
const hash = new SHAKE(256);
hash.update('hello world');
console.log(hash.digest({ buffer: Buffer.alloc(32) }).toString('hex'));

Other packages similar to sha3

Keywords

FAQs

Package last updated on 29 Apr 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc