Documentation
¶
Index ¶
- Constants
- func DecryptPrivateKeyPEM(pemData []byte, password string) ([]byte, error)
- func EncryptPKCS8PrivateKeyPEM(pemData []byte, password string) ([]byte, error)
- func GenerateECKeys() (crypto.PrivateKey, []byte, crypto.PublicKey, []byte, error)
- func GenerateRSAKeys() (crypto.PrivateKey, []byte, crypto.PublicKey, []byte, error)
- func GetHexFormatted(buf []byte, sep string) string
- func KeysMatch(priv crypto.PrivateKey, pub crypto.PublicKey) bool
- func MarshalPrivateKeyToPEM(privateKey crypto.PrivateKey) ([]byte, error)
- func MarshalPublicKeyToPEM(publicKey crypto.PublicKey) ([]byte, error)
- func ParseCRLsPEM(pemCrls []byte) ([]*x509.RevocationList, error)
- func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error)
- func ParsePrivateKeyPEM(keyData []byte) (crypto.PrivateKey, error)
- func ParsePublicKeysPEM(keyData []byte) ([]crypto.PublicKey, error)
- func ReadPrivateKey(r io.Reader) (crypto.PrivateKey, error)
- func ReadPrivateKeyFile(filename string) (crypto.PrivateKey, error)
- func ReadPublicKeyFile(filename string) (crypto.PublicKey, error)
- func ReadPublicKeys(r io.Reader) ([]crypto.PublicKey, error)
Constants ¶
View Source
const ( X509CRLBlockType = "X509 CRL" CertificateBlockType = "CERTIFICATE" ECPrivateKeyBlockType = "EC PRIVATE KEY" RSAPrivateKeyBlockType = "RSA PRIVATE KEY" PrivateKeyBlockType = "PRIVATE KEY" PublicKeyBlockType = "PUBLIC KEY" ECPublicKeyType = "EC PUBLIC KEY" )
Variables ¶
This section is empty.
Functions ¶
func DecryptPrivateKeyPEM ¶ added in v0.0.6
func EncryptPKCS8PrivateKeyPEM ¶ added in v0.0.6
func GenerateECKeys ¶
func GenerateRSAKeys ¶
func GetHexFormatted ¶
func MarshalPrivateKeyToPEM ¶
func MarshalPrivateKeyToPEM(privateKey crypto.PrivateKey) ([]byte, error)
func ParseCRLsPEM ¶
func ParseCRLsPEM(pemCrls []byte) ([]*x509.RevocationList, error)
func ParseCertsPEM ¶
func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error)
func ParsePrivateKeyPEM ¶
func ParsePrivateKeyPEM(keyData []byte) (crypto.PrivateKey, error)
func ReadPrivateKey ¶
func ReadPrivateKey(r io.Reader) (crypto.PrivateKey, error)
func ReadPrivateKeyFile ¶
func ReadPrivateKeyFile(filename string) (crypto.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.