Standard library / crypto/x509
crypto/x509.KeyUsageEncipherOnly
KeyUsage bit for enciphering only in conjunction with key agreement. Combine with other flags using bitwise OR. The flag does not by itself establish trust. Expected stdout: '128\n'.
Formal Syntax & Structure
go syntaxgo
const KeyUsageEncipherOnly KeyUsage = 128Working Example
Example Snippetgo
package main
import ( "crypto/x509" "fmt")
func main() { fmt.Println(int(x509.KeyUsageEncipherOnly)) }
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) }}