crypto

package
v0.0.1-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCertificateChain

func BuildCertificateChain(intermediateCa string, certificate []byte, caCertificate []byte) (*bytes.Buffer, *bytes.Buffer, error)

func GetSubordinateCaParameters

func GetSubordinateCaParameters(service string) (*types.CertificateAuthority, error)

func GetSubordinateCaPath

func GetSubordinateCaPath(service string) (*string, *string, error)

func ReturnPrivateKey

func ReturnPrivateKey(key types.AsymmetricKey) (interface{}, error)

func WriteKeyToFile

func WriteKeyToFile(service string, privateKey types.AsymmetricKey) error

Types

type ECDSA

type ECDSA struct {
	PublicKey  *ecdsa.PublicKey
	PrivateKey *ecdsa.PrivateKey
}

func (*ECDSA) KeyPair

func (key *ECDSA) KeyPair() interface{}

func (*ECDSA) Sign

func (key *ECDSA) Sign(data []byte) ([]byte, error)

type RSA

type RSA struct {
	PublicKey  *rsa.PublicKey
	PrivateKey *rsa.PrivateKey
}

func (*RSA) KeyPair

func (key *RSA) KeyPair() interface{}

func (*RSA) Sign

func (key *RSA) Sign(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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