Documentation ¶
Overview ¶
Package crypto contains various cryptography-related convenience functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
func LoadCertificate(path string) (*tls.Certificate, error)
LoadCertificate reads certificate(s) from a file in PEM format.
func LoadKey ¶
func LoadKey(path string) (crypto.PrivateKey, error)
LoadKey reads a private key in PKCS #1 or #8 form from a file in PEM format.
func LoadKeyAndCertificate ¶
func LoadKeyAndCertificate(keyPath string, certificatePath string) (*tls.Certificate, error)
LoadKeyAndCertificate reads certificate(s) and a private key in PKCS #1 or #8 form from files in PEM format.
func LoadX509Certificate ¶
func LoadX509Certificate(path string) ([]*x509.Certificate, error)
LoadX509Certificate reads certificate(s) from a file in PEM format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.