MCPcopy Index your code
hub / github.com/coder/coder / HashContent

Function HashContent

coderd/telemetry/telemetry.go:1129–1131  ·  view source on GitHub ↗

HashContent returns a SHA256 hash of the content as a hex string. This is useful for hashing sensitive content like prompts for telemetry.

(content string)

Source from the content-addressed store, hash-verified

1127// HashContent returns a SHA256 hash of the content as a hex string.
1128// This is useful for hashing sensitive content like prompts for telemetry.
1129func HashContent(content string) string {
1130 return fmt.Sprintf("%x", sha256.Sum256([]byte(content)))
1131}
1132
1133// ConvertAPIKey anonymizes an API key.
1134func ConvertAPIKey(apiKey database.APIKey) APIKey {

Callers 2

TestTasksTelemetryFunction · 0.92
ConvertTaskFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTasksTelemetryFunction · 0.74