Skip to content

Commit

Permalink
#43: Removed unneeded method
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-glushko committed Jan 8, 2024
1 parent a97e296 commit 8abb389
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/config/fields/secret.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package fields

import (
"crypto/md5"
"encoding"
"encoding/hex"
)

// Secret is a string that is marshaled in an opaque way, so we are not leaking sensitive information
Expand All @@ -17,10 +15,3 @@ var _ encoding.TextMarshaler = Secret("")
func (s Secret) MarshalText() ([]byte, error) {
return []byte(maskedSecret), nil
}

// Hash generates a digest of the secret to be used instead of the actual secret value
func (s Secret) Hash() string {
hash := md5.Sum([]byte(s))

return hex.EncodeToString(hash[:])
}

0 comments on commit 8abb389

Please sign in to comment.