Socket
Socket
Sign inDemoInstall

@ethersproject/sha2

Package Overview
Dependencies
5
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ethersproject/sha2

The SHA2 family hash functions and HMAC functions for ethers.


Version published
Weekly downloads
678K
decreased by-2.45%
Maintainers
1
Install size
214 kB
Created
Weekly downloads
 

Package description

What is @ethersproject/sha2?

@ethersproject/sha2 is a part of the ethers.js library, which provides utilities for interacting with the Ethereum blockchain. This specific package focuses on SHA-2 hashing algorithms, allowing developers to create secure hashes for data integrity and cryptographic purposes.

What are @ethersproject/sha2's main functionalities?

SHA-256 Hashing

This feature allows you to create a SHA-256 hash of a given input. SHA-256 is a widely used cryptographic hash function that produces a 256-bit hash value.

const { sha256 } = require('@ethersproject/sha2');
const data = 'Hello, world!';
const hash = sha256(data);
console.log(hash);

SHA-512 Hashing

This feature allows you to create a SHA-512 hash of a given input. SHA-512 is another cryptographic hash function that produces a 512-bit hash value, offering a higher level of security compared to SHA-256.

const { sha512 } = require('@ethersproject/sha2');
const data = 'Hello, world!';
const hash = sha512(data);
console.log(hash);

Other packages similar to @ethersproject/sha2

Readme

Source

SHA2 Hash Functions

This sub-module is part of the ethers project.

It is responsible for common cryptographic hashes and HMAC.

For more information, see the documentation.

Importing

Most users will prefer to use the umbrella package, but for those with more specific needs, individual components can be imported.

const {

    ripemd160,

    sha256,
    sha512,

    computeHmac,

    // Enums

    SupportedAlgorithm

} = require("@ethersproject/sha2");

License

MIT License

Keywords

FAQs

Last updated on 19 Aug 2022

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc