Standard library / crypto

crypto.SignerOpts

Options interface exposing HashFunc. The signing algorithm may require additional options. A zero identifier indicates an unhashed message in applicable schemes. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
type SignerOpts interface {  HashFunc() Hash}

Working Example

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