Socket
Book a DemoInstallSign in
Socket

digestif

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digestif

Cross-Platform SHA2 hash digests.

latest
Source
npmnpm
Version
0.1.9
Version published
Maintainers
1
Created
Source

digestif

2954 1173

Cross-platform SHA2 hash digests.

This library produces digest hashes for any binary type or string with a very low footprint and impact on bundle size in browsers.

It also works in Node.js but still restricts itself to the hash types supported in the browser without external dependencies.

const digest = require('digestif')
let hash = digest('hello world') // defaults to sha256
assert(hash instanceof ArrayBuffer)

// Accepts any binary type
hash = digest(new Uint8Array(20))

// Supports SHA2 256, 384 and 512
hash = digest('hello world', 'SHA-512')

FAQs

Package last updated on 10 Oct 2020

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