Hashed Device Fingerprint JS

A lightweight JavaScript library for generating unique device fingerprints with both client-side and server-side support

npm install hashed-device-fingerprint-js

Secure Hashing

Uses advanced hashing algorithms to generate unique device fingerprints

Server-Side Support

Generate fingerprints on both client and server environments

Easy Integration

Simple API for quick implementation in any JavaScript project

Quick Start


import { generateHashedFingerprint } from 'hashed-device-fingerprint-js';

// Generate a unique device fingerprint
generateHashedFingerprint()
    .then(hash => console.log('Fingerprint Hash:', hash))
    .catch(error => console.error('Error:', error));
            

Custom Options


import { generateHashedFingerprint } from 'hashed-device-fingerprint-js';

generateHashedFingerprint({
    useUserAgent: true,         // Include the user agent (default: true)
    useLanguage: false,         // Exclude the browser language
    useScreenResolution: true,  // Include screen resolution (default: true)
    usePlatform: true,          // Include platform information (default: true)
    useConcurrency: true,       // Include logical processors (default: true)
    useIP: true,                // Fetch and include the user's IP (default: true)
    userIP: '203.0.113.45',     // Provide IP manually (overrides API fetch)
    saveToCookie: false,        // Do not save the hash in a cookie (default: true)
    cookieExpiryDays: 10        // Cookie expiry in days (default: 7)
})
    .then(hash => console.log('Custom Fingerprint Hash:', hash))
    .catch(error => console.error('Error:', error));
            

Key Features

Client-Side Features

  • Browser fingerprinting
  • Device information collection
  • Cross-browser compatibility

Server-Side Features

  • Server environment detection
  • Request-based fingerprinting
  • Node.js compatibility