Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
chacha20-universal
Advanced tools
Chacha20 implemented in Javascript.
npm install chacha20-universal
var crypto = require('crypto')
var Chacha20 = require('chacha20')
var key = crypto.randomBytes(32)
var nonce = crypto.randomBytes(24)
var out = Buffer.alloc(5)
var xor = new Chacha20(nonce, key)
xor.update(out, Buffer.from('hello'))
xor.update(out, Buffer.from('world'))
console.log(out)
// e.g. <Buffer 7c 77 23 51 f9>
xor.finalize()
var xor = chacha20(nonce, key, [counter])
Create a new xor instance.
n
should be a 12 byte nonce passed as a buffer/uint8array and k
should be a 32 byte key. An optional counter
may be passed as a number.
xor.update(output, input)
Update the xor instance with a new input
buffer, the result is written to output
buffer. output
should be the same byte length as input
.
xor.final()
Call this method last. Clears internal state.
MIT
FAQs
chacha20 in pure javascript
The npm package chacha20-universal receives a total of 5,383 weekly downloads. As such, chacha20-universal popularity was classified as popular.
We found that chacha20-universal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.