MCPcopy Create free account
hub / github.com/castai/openwebui-content-sync / GetFileHash

Function GetFileHash

internal/sync/manager.go:530–533  ·  view source on GitHub ↗

GetFileHash calculates the hash of a file

(content []byte)

Source from the content-addressed store, hash-verified

528
529// GetFileHash calculates the hash of a file
530func GetFileHash(content []byte) string {
531 hash := sha256.Sum256(content)
532 return fmt.Sprintf("%x", hash)
533}

Callers 1

TestGetFileHashFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetFileHashFunction · 0.68