MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / entryptionKey

Function entryptionKey

cli/pkg/common/log.go:134–145  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

132}
133
134func entryptionKey(content string) string {
135 for _, entryptionKeyConfig := range _entryptionKeyConfigs {
136 if entryptionKeyConfig.IsReservePart && len(entryptionKeyConfig.SecretKey) > 3 {
137 newStr := entryptionKeyConfig.SecretKey[:3] + "******" + entryptionKeyConfig.SecretKey[len(entryptionKeyConfig.SecretKey)-3:]
138 content = strings.ReplaceAll(content, entryptionKeyConfig.SecretKey, newStr)
139 } else {
140 content = strings.ReplaceAll(content, entryptionKeyConfig.SecretKey, "***")
141 }
142 }
143
144 return content
145}
146
147func (sLog *smartIDELogStruct) Error(err interface{}, headers ...string) (reErr error) {
148

Callers 5

entryptionKeysFunction · 0.85
InfoMethod · 0.85
DebugMethod · 0.85
ImportanceMethod · 0.85
WarningMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected