How to use the fingerprintjs2.x64hash128 function in fingerprintjs2

To help you get started, we’ve selected a few fingerprintjs2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OriginProtocol / origin / dapps / marketplace / src / hoc / withFingerprint.js View on Github external
return Fingerprint2.getPromise({}).then(components => {
    const values = components.map(component => component.value)
    const hash = `V1-${Fingerprint2.x64hash128(values.join(''), 31)}`

    // Select the browser properties to export along with the fingerprint.
    const browserProps = {}
    components
      .filter(x => browserPropsWhitelist.includes(x.key))
      .forEach(x => (browserProps[x.key] = x.value))
    cachedFingerprintData = { fingerprint: hash, ...browserProps }
  })
}
github feryandi / PilahPilihPilpres / fe / src / components / Home.js View on Github external
Fingerprint2.get(options, (components) => {
          var values = components.map(function (component) { return component.value });
          var murmur = Fingerprint2.x64hash128(values.join(''), 31);
          nookies.set({}, 'fp', murmur, {
            maxAge: 30 * 24 * 60 * 60,
            path: '/',
          });
          this.getSession(murmur);
      });
    } else {
github go-faast / faast-web / src / utilities / cfp.js View on Github external
async function generate() {
  try {
    const components = await Fp2.getPromise()
    const values = components.map(({ value }) => value)
    cfp = Fp2.x64hash128(values.join(''), 31)
    log.log('generate cfp', cfp)
  } catch (e) {
    log.error('failed to generate cfp', e)
  }
}

fingerprintjs2

Warning! The library is renamed to @fingerprintjs/fingerprintjs. See https://github.com/fingerprintjs/fingerprintjs to get updates.

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis