MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hashFilePath

Function hashFilePath

source code/utils/fileOperationAnalytics.ts:11–18  ·  view source on GitHub ↗

* Creates a truncated SHA256 hash (16 chars) for file paths * Used for privacy-preserving analytics on file operations

(
  filePath: string,
)

Source from the content-addressed store, hash-verified

9 * Used for privacy-preserving analytics on file operations
10 */
11function hashFilePath(
12 filePath: string,
13): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS {
14 return createHash('sha256')
15 .update(filePath)
16 .digest('hex')
17 .slice(0, 16) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
18}
19
20/**
21 * Creates a full SHA256 hash (64 chars) for file contents

Callers 1

logFileOperationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected