Files
cryptography/util/util.go
omicron 15bbbbda61
Some checks failed
Validate the build / validate-build (push) Failing after 32s
DROPME Just a formatting error to test ci/cd
2025-05-20 22:36:46 +02:00

14 lines
359 B
Go

// package util provides small utility functions that make it easier to express common things
package util
import "encoding/hex"
// DeHex decodes a hexadecimal string into a byte slice. Panics if the string is invalid.
func DeHex(s string) []byte {
decoded, err := hex.DecodeString(s)
if err != nil {
panic("invalid hex string")
}
return decoded
}