Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A pure Javascript implementation of SipHash-2-4
SipHash is a family of pseudorandom functions optimized for short inputs. Target applications include network traffic authentication and hash-table lookups protected against hash-flooding denial-of-service attacks. SipHash has well-defined security goals and competitive performance.
Server-side installation (nodejs):
$ npm install siphash
Browser-side: use lib/siphash.min.js
.
var siphash = require("siphash"),
key = siphash.string16_to_key("0123456789ABCDEF"),
message = "Short test message",
hash_hex = siphash.hash_hex(key, message);
A key is an array of 4 integers, and each of them will be clamped to
32 bits in order to build a 128-bit key.
For a random key, just generate 4 random integers instead of calling
string16_to_key()
.
var siphash = require("siphash"),
key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],
message = "Short test message",
hash_hex = siphash.hash_hex(key, message);
The 64-bit hash can also be obtained as two 32-bit values with
hash(key, message)
:
var siphash = require("siphash"),
key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],
message = "Short test message",
hash = siphash.hash(key, message),
hash_msb = hash.h,
hash_lsb = hash.l;
A 53-bit unsigned integer can be obtained with hash_uint(key, message)
:
var siphash = require("siphash"),
key = siphash.string16_to_key("0123456789ABCDEF"),
message = "Short test message",
index = siphash.hash_uint(key, message);
FAQs
SipHash-2-4 fast short-input pseudo-random function
We found that siphash demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.