Files
mstore/app/operator/imgaux.go
T
2026-02-04 12:32:54 +02:00

23 lines
356 B
Go

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
}