
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
SpookyHash V2 is a fast x64 targeted hash developed by Bob Jenkins. This python library is a wrapper around Bob Jenkin's public domain c++ implementation (current as of August 2012).
In python2 results are all long
type for consistency despite the fact that
32bit ints do not need to be.
The bit width features are a convenience to save a masking operation if you need shorter hashes. There isn't a significant performance difference between the hash size options as they are all computed internally as 128bit hashes.
>>> from spooky import hash128, hash64, hash32
>>> s = 'this is only a test...'
>>> hash128(s) #128bit python int from 2 unsigned long long ints in c
94655121727368234505791352840874203973
>>> hash64(s) #64bit int
13961228348271205189
>>> hash32(s) #32bit int
2261883717
>>> hash32(s) == hash64(s) & 0xffffffff == hash128(s) & 0xffffffff
True
>>> from binascii import hexlify #if you prefer hex strings to ints
>>> hexlify(hash128(s).to_bytes(16, 'little'))
b'459bd186363fc0c1f1da8d27d0e93547'
FAQs
Wrapper for SpookyHash V2
We found that spooky 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.