🐤 floppsy
![version](https://camo.githubusercontent.com/ca93bf66a5726e4a5db70ec2ac7aa57baa8955e5c4c89e3c2eec5f8baf4d3833/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f666c6f70707379)
A tiny, simple and slow hash designed for floating point hardware.
constructed using floating point multiplication, division and addition.
based on continued and egyptian fractions.
no bit operations used in the making of this hash.
passes smhasher
no claims are made regarding the security of this system.
npm i --save floppsy
As a Node ES module:
import floppsy from 'floppsy';
As old style modules:
const floppsy = require('floppsy').default;
Using Snowpack in a web app:
import floppsy from './web_modules/floppsy.js';
Can produce digests of 32, 64 or 128 bits.
> f.hash('')
'7f5f8491f0b745bf'
> f.hash('', {bits:32})
'7016ca50'
> f.hash('', {bits:128})
'3f7f508e3fe034033ff0e269b0c66356'
Can also change output format:
x.hash('',{out_format:'hex'}); // default
x.hash('',{out_format:'binary'}); // binary string
x.hash('',{out_format:'bytes'}); // Uint8Array
x.hash('',{out_format:'uint32s'}); // Uint32Array