Support SHA512 as hashing algorithm (#8)

This commit is contained in:
TwinProduction committed 2020-10-14 19:24:00 -04:00
1 parent 9220a777bb
commit c0b1fefec8
2 files changed
+24

No files matched your search

+12
View 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))
}