mirror of
https://github.com/TwiN/gatus.git
synced 2025-08-17 10:21:52 +02:00
Support SHA512 as hashing algorithm (#8)
This commit is contained in:
12
security/sha512.go
Normal file
12
security/sha512.go
Normal file
@ -0,0 +1,12 @@
|
||||
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))
|
||||
}
|
Reference in New Issue
Block a user