mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-21 21:16:27 +00:00
13 lines
220 B
Go
13 lines
220 B
Go
package crypto
|
|
|
|
import (
|
|
"crypto/sha512"
|
|
"encoding/hex"
|
|
)
|
|
|
|
// GenerateSHA generates SHA from string
|
|
func GenerateSHA(data string) string {
|
|
hash := sha512.Sum512_256([]byte(data))
|
|
return hex.EncodeToString(hash[:])
|
|
}
|