Documentation
¶
Index ¶
- Constants
- func DecodePemBlock(content []byte, targetType string) (*pem.Block, error)
- func PemEncodePrivate(content []byte) []byte
- func PemEncodePublic(content []byte) []byte
- func PemMarshalPrivate(key crypto.PrivateKey) ([]byte, error)
- func PemMarshalPublic(key crypto.PublicKey) ([]byte, error)
- func PemUnmarshalPrivate[T crypto.PrivateKey](content []byte) (key T, err error)
- func PemUnmarshalPublic[T crypto.PublicKey](content []byte) (key T, err error)
- func SshMarshalPrivate(key crypto.PrivateKey, comment string) ([]byte, error)
- func SshMarshalPublic(key crypto.PublicKey) ([]byte, error)
Constants ¶
View Source
const ( TypePemPublic = "PUBLIC KEY" TypePemPrivate = "PRIVATE KEY" )
Variables ¶
This section is empty.
Functions ¶
func PemEncodePrivate ¶
func PemEncodePublic ¶
func PemMarshalPrivate ¶
func PemMarshalPrivate(key crypto.PrivateKey) ([]byte, error)
func PemUnmarshalPrivate ¶
func PemUnmarshalPrivate[T crypto.PrivateKey](content []byte) (key T, err error)
func PemUnmarshalPublic ¶
func SshMarshalPrivate ¶
func SshMarshalPrivate(key crypto.PrivateKey, comment string) ([]byte, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.