* Creates a full SHA256 hash (64 chars) for file contents * Used for deduplication and change detection analytics
( content: string, )
| 20 | * Used for deduplication and change detection analytics |
| 21 | */ |
| 22 | function 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) |
no test coverage detected