Files
mpc/pkg/utils/utils.go
T
zeekay b45ac639ac Fix remaining import formatting issues
- Run goimports on all pkg files
- Ensure consistent import grouping throughout codebase
2025-08-02 22:30:28 -05:00

21 lines
386 B
Go

package utils
import (
"crypto/sha256"
"io"
"os"
"github.com/rs/zerolog"
)
// GetMessageHash returns the SHA256 hash of the message
func GetMessageHash(msgBytes []byte) []byte {
hash := sha256.Sum256(msgBytes)
return hash[:]
}
// ZerologConsoleWriter returns a console writer for zerolog
func ZerologConsoleWriter() io.Writer {
return zerolog.ConsoleWriter{Out: os.Stdout}
}