Standard library / crypto/sha512
crypto/sha512.Sum512()
Compute the SHA512 digest of a complete byte slice. A digest alone does not authenticate data; use HMAC or a signature where appropriate. Not a password hashing scheme. Expected stdout: 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\n'.
Formal Syntax & Structure
go syntaxgo
func Sum512(data []byte) [Size]byteParameters & Attributes
| Name | Type | Description |
|---|---|---|
| data | []byte | Exact input bytes to hash. |
Return Value
[Size]byte
Fixed-size SHA512 digest.
Working Example
Example Snippetgo
package main
import ( "crypto/sha512" "fmt")
func main() { fmt.Printf("%x\n", sha512.Sum512([]byte("abc"))) }