Standard library / crypto/ed25519
crypto/ed25519.Options.HashFunc()
Returns the configured hash identifier. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (o *Options) HashFunc() crypto.HashReturn Value
crypto.Hash
Result as described above; check any returned error before use.
Working Example
Example Snippetgo
package main
import ( "crypto" "crypto/ed25519" "fmt")
func main() { o := &ed25519.Options{Hash: crypto.SHA512}; fmt.Println(o.HashFunc() == crypto.SHA512) }func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}