New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hash-fingerprint

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-fingerprint

A library to generate browser and OS-based fingerprints using hashing

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by71.43%
Maintainers
0
Weekly downloads
 
Created
Source

Hash Fingerprint

A simple library to generate a unique fingerprint based on browser and OS information, and custom data using hashing (SHA-256).

Installation

To install the package, run:

npm install hash-fingerprint

## Usage

Import the library

import { generateFingerprint } from 'hash-fingerprint';

// Basic usage with browser and OS info
const fingerprint1 = generateFingerprint();
console.log(fingerprint1); // Outputs the hashed fingerprint

// Usage with custom data and no OS info
const fingerprint2 = generateFingerprint({
  useOSInfo: false,
  customData: { user_id: '12345', session_id: 'abcde' }
});

## options
interface FingerprintOptions {
    useBrowserInfo?: boolean; // Whether to include browser info
    useOSInfo?: boolean;      // Whether to include OS info
    customData?: Record<string, any>; // Additional custom data
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT# hash-fingerprint

Keywords

FAQs

Package last updated on 17 Dec 2024

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