Documentation ¶
Index ¶
- Variables
- func GenerateDefaultKey() (interface{}, error)
- func GenerateDefaultKeyPair() (interface{}, interface{}, error)
- func GenerateKey(kty, crv string, size int) (interface{}, error)
- func GenerateKeyPair(kty, crv string, size int) (interface{}, interface{}, error)
- func PublicKey(priv interface{}) (interface{}, error)
- func PublicPEM(pub interface{}) (*pem.Block, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPEMCipher = x509.PEMCipherAES128 // DefaultKeyType is the default type of a private key. DefaultKeyType = "EC" // DefaultKeySize is the default size (in # of bits) of a private key. DefaultKeySize = 2048 // DefaultKeyCurve is the default curve of a private key. DefaultKeyCurve = "P-256" )
DefaultPEMCipher is the default algorithm used when encrypting PEM blocks by the CA.
Functions ¶
func GenerateDefaultKey ¶
func GenerateDefaultKey() (interface{}, error)
GenerateDefaultKey generates a public/private key pair using sane defaults for key type, curve, and size.
func GenerateDefaultKeyPair ¶
func GenerateDefaultKeyPair() (interface{}, interface{}, error)
GenerateDefaultKeyPair generates a public/private key pair using configured default values for key type, curve, and size.
func GenerateKey ¶
GenerateKey generates a key of the given type (kty).
func GenerateKeyPair ¶
GenerateKeyPair creates an asymmetric crypto keypair using input configuration.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.