Comparing version 1.1.1 to 1.1.2
@@ -106,2 +106,4 @@ export const BEBB4185 = discohash; | ||
// ref: "I say we take take-off, nuke the site from orbit, only way to be sure" | ||
// also: this will make JS version diverge from C++ on strings | ||
// if an array of bytes are provided the results will be the same. | ||
@@ -108,0 +110,0 @@ let wasString = false; |
{ | ||
"name": "bebb4185", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A super-fast SMHasher-passing non-cryptographic hash function.", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
# :city_sunrise: [Discohash](https://github.com/cris691/discohash) | ||
#### **5GB/s** **[SMHasher](https://github.com/cris691/discohash/blob/master/Disco3.result.txt)** | ||
#### **[5GB/s SMHasher](https://github.com/cris691/discohash/blob/master/Disco3.result.txt)** [![version](https://img.shields.io/npm/v/bebb4185.svg?label=&color=0080FF)](https://github.com/cris691/discohash/releases/latest) ![npm downloads](https://img.shields.io/npm/dt/bebb4185) | ||
**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. | ||
**Discohash** (*also known as* **BEBB4185**) is a super-fast non-cryptographic hash that passes all of SMHasher, and runs at 5GB/s in this naive, portable implementation. | ||
**CLI app included** | ||
------ | ||
@@ -16,8 +18,20 @@ | ||
- Implemented in C++, and also a port to JS | ||
- This repo includes a simple CLI app for hashing files or stdin from the command line. | ||
## Using | ||
Use the C code from this repository, or, for a JS implementation: | ||
Use the C code from this repository, either in your project or as a CL-app (included): | ||
```console | ||
cd src | ||
./build.sh | ||
./bin/bebbsum < 0xa2a647993898a3df.txt | ||
> 0xa2a647993898a3df | ||
./bin/bebbsum 0xa2a647993898a3df.txt | ||
> 0xa2a647993898a3df | ||
``` | ||
or, for a JS implementation: | ||
```console | ||
npm i --save bebb4185 | ||
@@ -29,3 +43,3 @@ ``` | ||
```js | ||
import {disocash} from 'bebb4185' | ||
import {discohash} from 'bebb4185' | ||
``` | ||
@@ -39,2 +53,8 @@ | ||
Then call it: | ||
```js | ||
const hash = discohash(string_or_typed_array_key, optional_seed); | ||
``` | ||
## JS Implementation | ||
@@ -41,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
431610
18
224
69