2.2.8 • Published 4 months ago

get-device-signature v2.2.8

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

get-device-signature/getHashedString

A lightweight library to generate a unique device signature using browser attributes and SHA-256 hashing.

✨ Features

✅ Generates a unique, consistent device signature
✅ Uses SHA-256 hashing for security
✅ Works in modern browsers
✅ Zero dependencies


📦 Installation

Install the package via npm:

npm install get-device-signature

🚀 Usage

✅ Get a SHA-256 Hash of Any String

import { getHashedString } from "get-device-signature";

(async () => {
const hash = await getHashedString("Hello World");
console.log(hash); // Outputs a SHA-256 hashed string
})();

✅ 2. Generate a Unique Device Signature

import { getDeviceSignature } from "get-device-signature";

(async () => {
  const signature = await getDeviceSignature();
  console.log("Device Signature:", signature);
})();

This function collects browser attributes such as:

userAgent platform language hardwareConcurrency screenResolution Then, it hashes them into a unique identifier.

🛠️ How It Works

Collects browser attributes (User-Agent, OS, Screen Size, etc.). Converts them into a JSON string. Hashes the string using SHA-256. Returns a unique device signature. This makes it useful for identifying devices without tracking users.

📜 License

This package is open-source under the MIT License.

2.2.8

4 months ago

2.2.7

4 months ago

2.2.5

4 months ago

2.2.4

4 months ago

2.2.3

4 months ago

2.2.2

4 months ago

2.2.1

4 months ago

2.2.0

4 months ago

1.2.0

4 months ago

1.1.0

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago