mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
13 lines
173 B
Go
13 lines
173 B
Go
|
package security
|
||
|
|
||
|
import (
|
||
|
"crypto/sha512"
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
func Sha512(s string) string {
|
||
|
hash := sha512.New()
|
||
|
hash.Write([]byte(s))
|
||
|
return fmt.Sprintf("%x", hash.Sum(nil))
|
||
|
}
|