Socket
Socket
Sign inDemoInstall

chacha20-universal

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chacha20-universal - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

22

index.js

@@ -19,3 +19,3 @@ const assert = require('nanoassert')

for (let i = 0; i < 4; i++) this.state[i] = constant[i]
for (let i = 0; i < 8; i++) this.state[4 + i] = k.readUInt32LE(4 * i)
for (let i = 0; i < 8; i++) this.state[4 + i] = readUInt32LE(k, 4 * i)

@@ -26,8 +26,8 @@ this.state[12] = counter & 0xffffffff

this.state[13] = (counter && 0xffffffff00000000) >> 32
this.state[14] = n.readUInt32LE(0)
this.state[15] = n.readUInt32LE(4)
this.state[14] = readUInt32LE(n, 0)
this.state[15] = readUInt32LE(n, 4)
} else {
this.state[13] = n.readUInt32LE(0)
this.state[14] = n.readUInt32LE(4)
this.state[15] = n.readUInt32LE(8)
this.state[13] = readUInt32LE(n, 0)
this.state[14] = readUInt32LE(n, 4)
this.state[15] = readUInt32LE(n, 8)
}

@@ -135,1 +135,11 @@

}
function readUInt32LE (buf, offset) {
if (Buffer.isBuffer(buf)) return buf.readUInt32LE(offset)
else if (buf instanceof Uint8Array) {
var ret = 0
for (let i = 0; i < 4; i++) ret |= buf[offset + i] << (8 * i)
return ret
}
assert(false, 'buf should be a Buffer or a Uint8Array')
}
{
"name": "chacha20-universal",
"version": "1.0.1",
"version": "1.0.2",
"description": "chacha20 in pure javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

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