pemx

package
v0.9.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPEM

func BuildPEM(opts ...EntryOption) ([]byte, error)

func ReadPEM

func ReadPEM(pemBytes []byte, callback PEMBlockCallback) error

Types

type BlockOption

type BlockOption func(*pem.Block)

func WithHeader

func WithHeader(key, value string) BlockOption

type EntryOption

type EntryOption func(*pem.Block) error

func WithECDSAPrivateKey

func WithECDSAPrivateKey(key *ecdsa.PrivateKey, opts ...BlockOption) EntryOption

func WithECDSAPublicKey

func WithECDSAPublicKey(key *ecdsa.PublicKey, opts ...BlockOption) EntryOption

func WithRSAPrivateKey

func WithRSAPrivateKey(key *rsa.PrivateKey, opts ...BlockOption) EntryOption

func WithX509Certificate

func WithX509Certificate(cert *x509.Certificate, opts ...BlockOption) EntryOption

type PEMBlockCallback

type PEMBlockCallback func(idx int, blockType string, headers map[string]string, content []byte) error

Jump to

Keyboard shortcuts

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