Standard library / crypto
crypto.Hash.String()
Return the printable algorithm name. Unknown identifiers yield an implementation-defined descriptive name; do not parse it as a stable wire identifier. Expected stdout: 'SHA-256\n'.
Formal Syntax & Structure
go syntaxgo
func (h Hash) String() stringReturn Value
string
Human-readable algorithm name.
Working Example
Example Snippetgo
package main
import ( "crypto" "fmt")
func main() { fmt.Println(crypto.SHA256.String()) }