crypto

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2022 License: EPL-2.0, MIT Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL