MCPcopy
hub / github.com/codeaashu/claude-code / hashFileContent

Function hashFileContent

src/utils/fileOperationAnalytics.ts:22–28  ·  view source on GitHub ↗

* Creates a full SHA256 hash (64 chars) for file contents * Used for deduplication and change detection analytics

(
  content: string,
)

Source from the content-addressed store, hash-verified

20 * Used for deduplication and change detection analytics
21 */
22function hashFileContent(
23 content: string,
24): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS {
25 return createHash('sha256')
26 .update(content)
27 .digest('hex') as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
28}
29
30// Maximum content size to hash (100KB)
31// Prevents memory exhaustion when hashing large files (e.g., base64-encoded images)

Callers 1

logFileOperationFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected