crypto

package
v1.5.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPKCS1Key

func LoadPKCS1Key(in io.Reader) (*rsa.PrivateKey, error)

func LoadPKCS1KeyFile

func LoadPKCS1KeyFile(keyFile string) (*rsa.PrivateKey, error)

Types

type Certificate

type Certificate struct {
	// contains filtered or unexported fields
}

func NewSelfSignedCertificate

func NewSelfSignedCertificate(key *rsa.PrivateKey, isCA bool, ipAddresses []net.IP) (Certificate, error)

func NewSignedCertificate

func NewSignedCertificate(parent Certificate, ipAddress []net.IP) (Certificate, error)

func (*Certificate) MarshalCertficate

func (cert *Certificate) MarshalCertficate(out io.Writer) error

func (*Certificate) MarshalPrivateKey

func (cert *Certificate) MarshalPrivateKey(out io.Writer) error

type UserKey added in v1.5.0

type UserKey struct {
	// contains filtered or unexported fields
}

func LoadUserKey added in v1.5.0

func LoadUserKey(path string) (*UserKey, error)

func (*UserKey) ClientID added in v1.5.0

func (u *UserKey) ClientID() string

func (*UserKey) PrivateKey added in v1.5.0

func (u *UserKey) PrivateKey() *rsa.PrivateKey

func (*UserKey) PublicKey added in v1.5.0

func (u *UserKey) PublicKey() *rsa.PublicKey

Jump to

Keyboard shortcuts

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