MCPcopy Create free account
hub / github.com/Driver-C/tryssh / MaskSecret

Function MaskSecret

pkg/utils/tools.go:30–35  ·  view source on GitHub ↗

MaskSecret masks a secret string, returning a fixed-length indicator.

(s string)

Source from the content-addressed store, hash-verified

28
29// MaskSecret masks a secret string, returning a fixed-length indicator.
30func MaskSecret(s string) string {
31 if len(s) == 0 {
32 return "<empty>"
33 }
34 return "****"
35}

Callers 3

updateConfigMethod · 0.92
StringMethod · 0.92
TestMaskSecretFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMaskSecretFunction · 0.68