Socket
Socket
Sign inDemoInstall

@noble/hashes

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noble/hashes - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

10

_sha2.js

@@ -86,3 +86,11 @@ "use strict";

const oview = (0, utils_js_1.createView)(out);
this.get().forEach((v, i) => oview.setUint32(4 * i, v, isLE));
const len = this.outputLen;
if (len % 4)
throw new Error('_sha2: outputLen should be aligned to 32bit');
const state = this.get();
const outLen = len / 4;
if (outLen > state.length)
throw new Error('_sha2: outputLen bigger than state');
for (let i = 0; i < outLen; i++)
oview.setUint32(4 * i, state[i], isLE);
}

@@ -89,0 +97,0 @@ digest() {

@@ -83,3 +83,11 @@ import assert from './_assert.js';

const oview = createView(out);
this.get().forEach((v, i) => oview.setUint32(4 * i, v, isLE));
const len = this.outputLen;
if (len % 4)
throw new Error('_sha2: outputLen should be aligned to 32bit');
const state = this.get();
const outLen = len / 4;
if (outLen > state.length)
throw new Error('_sha2: outputLen bigger than state');
for (let i = 0; i < outLen; i++)
oview.setUint32(4 * i, state[i], isLE);
}

@@ -86,0 +94,0 @@ digest() {

2

package.json
{
"name": "@noble/hashes",
"version": "1.1.3",
"version": "1.1.4",
"description": "Audited & minimal 0-dependency JS implementation of SHA2, SHA3, RIPEMD, BLAKE2/3, HMAC, HKDF, PBKDF2, Scrypt",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc