Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bebb4185

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bebb4185

A super-fast SMHasher-passing non-cryptographic hash function.

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

:city_sunrise: Discohash

5GB/s SMHasher

Discohash (also known as BEBB4185) is a super-fast non-cryptographic hash that passes SMHasher, and runs at 5GB/s in this naive, portable implementation.


Quick Facts

  • A super-fast 64-bit non-cryptographic hash.
  • Tested at ~ 5GB/s @ 3Gz.
  • Passes all SMHasher tests.
  • Also known as: BEBB4185
  • Implemented in C++, and also a port to JS

Using

Use the C code from this repository, or, for a JS implementation:

npm i --save bebb4185

Use in Node.JS:

import {disocash} from 'bebb4185'

Or using Snowpack as a webmodule:

import {discohash} from './web_modules/bebb4185.js';

JS Implementation

  • The JS Implementation produces the same value hashes as the C++ implementation.
  • The JS implementation is ~ 1000x slower than the C++ implementation.
  • This is probably because of the use of BigInts to stand in for uint64_t
  • It's possible to implement a 64-bit mult using 32-bit view which would remove the need for BigInt. I have no plan to do this.

SMHasher verification value

The value is: BEBB4185

Keywords

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

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.

Install

Related posts

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