Standard library / crypto/x509

crypto/x509.Ed25519

Public key algorithm identifier for Ed25519. An identifier is not a trust decision. Expected stdout: '4\n'.

Formal Syntax & Structure

go syntaxgo
const Ed25519 PublicKeyAlgorithm = 4

Working Example

Example Snippetgo
package main
import (  "crypto/x509"  "fmt")
func main() { fmt.Println(int(x509.Ed25519)) }
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)  }}
Go Reference