Documentation ¶
Overview ¶
Package key provides RSA Key API management for crypto/x509/rsa.
This package makes easy to generate Keys and load RSA from files to be used by GoLang applications.
Generating RSA Keys, the files will be saved in the $CAPATH by default. For $CAPATH, please check out the GoCA documentation.
Index ¶
- func ConvertPrivateKeyFromDerToPem(privateKey *rsa.PrivateKey) (privateKeyPem []byte, err error)
- func ConvertPublicKeyFromDerToPem(publicKey *rsa.PublicKey) (publicKeyPem []byte, err error)
- func ConvertRsaPrivateKeyFromDerToPem(privateKey *rsa.PrivateKey) (rsaPrivateKeyPem []byte, err error)
- func LoadPrivateKeyFromPem(keyPem []byte) (*rsa.PrivateKey, error)
- func LoadPublicKeyFromPem(keyPem []byte) (*rsa.PublicKey, error)
- type KeysData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPrivateKeyFromDerToPem ¶
func ConvertPrivateKeyFromDerToPem(privateKey *rsa.PrivateKey) (privateKeyPem []byte, err error)
ConvertPrivateKeyFromDerToPem permit to convert private key from DER format to PEM format
func ConvertPublicKeyFromDerToPem ¶
ConvertPrivateKeyFromDerToPem permit to convert public key from DER format to PEM format
func ConvertRsaPrivateKeyFromDerToPem ¶ added in v1.0.4
func ConvertRsaPrivateKeyFromDerToPem(privateKey *rsa.PrivateKey) (rsaPrivateKeyPem []byte, err error)
ConvertRsaPrivateKeyFromDerToPem permit to convert private key from DER format to PEM format
func LoadPrivateKeyFromPem ¶
func LoadPrivateKeyFromPem(keyPem []byte) (*rsa.PrivateKey, error)
LoadPrivateKey loads a RSA Private Key from a pem contend.
Types ¶
Click to show internal directories.
Click to hide internal directories.