Standard library / crypto

crypto.Hash.HashFunc()

Return the identifier itself; Hash satisfies SignerOpts. A zero identifier is used by some signing schemes for un-hashed messages. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (h Hash) HashFunc() Hash

Return Value

Hash

Same hash identifier.

Working Example

Example Snippetgo
package main
import (  "crypto"  "fmt")
func main() { fmt.Println(crypto.SHA256.HashFunc() == crypto.SHA256) }
Go Reference