Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@emotion/hash
Advanced tools
@emotion/hash is a small utility for generating hash values from strings. It is often used in CSS-in-JS libraries to create unique class names based on the content of the styles.
Generate Hash
This feature allows you to generate a hash value from a given string. The hash function takes a string as input and returns a unique hash value.
const hash = require('@emotion/hash');
const hashedValue = hash('some string to hash');
console.log(hashedValue);
hash.js is a library for creating hash digests of strings and binary data. It supports various hash algorithms like SHA-1, SHA-256, and more. Compared to @emotion/hash, hash.js offers more flexibility in terms of the hashing algorithms you can use.
object-hash is a library for generating hash values from JavaScript objects. It is useful for creating unique identifiers for complex data structures. While @emotion/hash is focused on strings, object-hash provides more functionality for hashing objects.
crypto is a built-in Node.js module that provides cryptographic functionality, including a set of wrappers for OpenSSL's hash functions. It is more comprehensive and versatile compared to @emotion/hash, which is a lightweight, specialized utility.
A MurmurHash2 implementation
import hash from '@emotion/hash'
hash('some-string') // 12fj1d
The source of this is from https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js.
FAQs
A MurmurHash2 implementation
The npm package @emotion/hash receives a total of 11,284,873 weekly downloads. As such, @emotion/hash popularity was classified as popular.
We found that @emotion/hash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.