Standard library / crypto/sha512

crypto/sha512.Sum384()

Compute the SHA384 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: 'cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7\n'.

Formal Syntax & Structure

go syntaxgo
func Sum384(data []byte) [Size384]byte

Parameters & Attributes

NameTypeDescription
data[]byteExact input bytes to hash.

Return Value

[Size384]byte

Fixed-size SHA384 digest.

Working Example

Example Snippetgo
package main
import (  "crypto/sha512"  "fmt")
func main() { fmt.Printf("%x\n", sha512.Sum384([]byte("abc"))) }
Go Reference