Files
m2pool_payment/internal/crypto/crypto.go
2025-10-16 18:54:27 +08:00

13 lines
195 B
Go

package crypto
import (
"crypto/sha256"
"encoding/hex"
)
func Sha256Hash(key string) []byte {
bytes, _ := hex.DecodeString(key)
sha256_hash := sha256.Sum256(bytes)
return sha256_hash[:]
}