mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
- Run goimports on all pkg files - Ensure consistent import grouping throughout codebase
21 lines
386 B
Go
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}
|
|
}
|