V2bX/common/crypt/sha.go

12 lines
159 B
Go
Raw Normal View History

2023-07-14 00:54:09 -04:00
package crypt
import (
"crypto/sha256"
"encoding/hex"
)
func GenShaHash(data []byte) string {
d := sha256.Sum256(data)
return hex.EncodeToString(d[:])
}