working commit

This commit is contained in:
2026-02-04 12:32:54 +02:00
parent 24b9acd678
commit 219a4cb890
17 changed files with 736 additions and 43 deletions
+22
View File
@@ -0,0 +1,22 @@
package operator
import (
"encoding/hex"
"strings"
)
const sha256prefix = "sha256:"
func stringLikeSHA256Digest(some string) bool {
if strings.HasPrefix(some, sha256prefix) {
some = strings.TrimPrefix(some, sha256prefix)
}
_, err := hex.DecodeString(some)
if err != nil {
return false
}
if len(some) == 64 {
return true
}
return false
}