/** * SMI-914: User Data Anonymization * SMI-917: Per-installation salt for improved anonymization security * * Provides one-way hashing functions to anonymize user identifiers * and project context without storing any PII. */ /** * Get the path to the installation-specific salt file * * @returns Path to ~/.skillsmith/anonymizer-salt */ export declare function getSaltPath(): string; /** * Load existing salt or create a new one for this installation * * The salt is: * - Generated once per installation (32 random bytes) * - Stored at ~/.skillsmith/anonymizer-salt * - Cached in memory after first load * - Falls back to static salt if file operations fail * * @returns Buffer containing the salt */ export declare function loadOrCreateSalt(): Buffer; /** * Clear the cached salt (primarily for testing) */ export declare function clearSaltCache(): void; /** * Anonymize a user identifier using SHA-256 hash * * The hash is: * - One-way: Cannot recover the original identifier * - Consistent: Same input always produces same output * - Truncated: 16 characters for storage efficiency * * @param identifier - The user identifier to anonymize (e.g., machine ID, username) * @returns Anonymized 16-character hex string */ export declare function anonymizeUserId(identifier: string): string; /** * Hash project context to avoid storing PII * * Creates a deterministic hash of the project context object, * allowing grouping of usage events by project type without * storing actual project paths or names. * * @param context - Object containing project context (framework, language, etc.) * @returns 8-character hex hash of the context */ export declare function hashProjectContext(context: Record): string; //# sourceMappingURL=anonymizer.d.ts.map