Documentation ¶
Overview ¶
Package key defines cobra commands to manage private and public keys.
Index ¶
- func Cmd(pather command.Pather) *cobra.Command
- func EncodePEMPrivateKey(key crypto.PrivateKey) ([]byte, error)
- func LoadPrivateKey(filename string) (crypto.Signer, error)
- func NewPrivateCmd(pather command.Pather) *cobra.Command
- func NewPublicCmd(pather command.Pather) *cobra.Command
- func NewSymmetricCmd(pather command.Pather) *cobra.Command
- type PrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePEMPrivateKey ¶
func EncodePEMPrivateKey(key crypto.PrivateKey) ([]byte, error)
EncodePEMPrivateKey encodes the private key in PEM format.
func LoadPrivateKey ¶
LoadPrivate key loads a private key from file.
func NewPrivateCmd ¶
NewPrivateCmd returns a cobra command that generates new private keys.
func NewPublicCmd ¶
NewPublicCmd returns a cobra command that returns the public key for a given private key.
Types ¶
type PrivateKey ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey(curve string) (PrivateKey, error)
GeneratePrivateKey generates a new private key.
Click to show internal directories.
Click to hide internal directories.