Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRsaPubKeyConversion = errors.New("Unable to convert public key to RSA public key")
ErrRsaPubKeyConversion indicates a public key could not be converted to an RSA public key
View Source
var ErrWrongPrivateKey = errors.New("failed to decode PEM block containing private key")
ErrWrongPrivateKey indicates a wrong private key format
View Source
var ErrWrongPublicKey = errors.New("failed to decode PEM block containing public key, key is of the wrong type")
ErrWrongPublicKey indicates a wrong public key format
Functions ¶
func PemToPrivateKey ¶
PemToPrivateKey converts a PEM encoded private key to a Signer interface. It supports EC, RSA and PKIX PEM encoded strings
func PemToPublicKey ¶
PemToPublicKey converts a PEM encoded public key to a crypto.PublicKey
func PrivateKeyToPem ¶
func PrivateKeyToPem(pub crypto.PrivateKey) (string, error)
PrivateKeyToPem converts an public key to PEM encoding
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.