// Line by line explanation: // crypto.randomBytes(32) → Generates 32 random bytes (256 bits) // crypto.createHash('sha256') → Creates SHA-256 hash algorithm // .update(randomData) → Feeds the random bytes into the hash // .digest('hex') → Outputs 64-character hex string
// Example result: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
// This hash is PURELY RANDOM: // ✗ NOT based on your hardware ID // ✗ NOT based on your IP address // ✗ NOT based on your MAC address // ✗ NOT based on any personal identifier // ✓ SHA-256 of random bytes - cryptographically secure // ✓ Impossible to trace back to you
2
First Install
Runs once when the browser starts for the first time
// Line by line explanation: // if (!data.registered) → Only runs ONCE, on first browser launch // apiRequest('/api/install') → Sends data to transparency server // install_hash → Your random anonymous ID (from step 1) // os: getOSName() → Just "Windows", "macOS", or "Linux" // version: browserVersion → Browser version like "1.0.0" // data.registered = true → Marks as done, won't run again // scheduleNextPing() → Starts the online ping schedule
3
Online Ping
Random interval between 30 minutes and 4 hours
const MIN = 30 * 60 * 1000; const MAX = 4 * 60 * 60 * 1000;
// Line by line explanation: // MIN = 30 * 60 * 1000 → Minimum wait: 30 minutes (in milliseconds) // MAX = 4 * 60 * 60 * 1000 → Maximum wait: 4 hours (in milliseconds) // Math.random() * (MAX-MIN) → Random number between 0 and 3.5 hours // delay = MIN + random → Final delay: between 30 min and 4 hours // setTimeout(..., delay) → Wait random time, then execute // install_hash → Your anonymous ID (same as install) // ping_hash: generateHash() → NEW random hash for each ping // scheduleNextPing() → After ping, schedule the next one
// Why random intervals? // ✓ Prevents pattern analysis of when you use the browser // ✓ No one can determine your daily routine from ping times // ✓ Each ping has a different random hash for extra privacy