util

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESToPEM added in v1.0.1

func AESToPEM(raw []byte) []byte

AESToPEM encapsulates an AES key in the PEM format

func DERToPrivateKey

func DERToPrivateKey(der []byte) (key interface{}, err error)

DERToPrivateKey unmarshals a der to private key

func PEMToAES added in v1.0.1

func PEMToAES(raw []byte) ([]byte, error)

PEMToAES extracts from the PEM an AES key

func PEMToPrivateKey added in v1.0.1

func PEMToPrivateKey(raw []byte) (interface{}, error)

PEMToPrivateKey unmsrshals a pem to private key

func PEMToPublicKey added in v1.0.1

func PEMToPublicKey(raw []byte) (interface{}, error)

PEMToPublicKey unmarshals a PEM to public key

func PrivateKeyToDER added in v1.0.1

func PrivateKeyToDER(privateKey *ecdsa.PrivateKey) ([]byte, error)

PrivateKeyToDER marshals a private key to der

func PrivateKeyToPEM added in v1.0.1

func PrivateKeyToPEM(privateKey interface{}) ([]byte, error)

PrivateKeyToPEM converts the private key to PEM format.

func PublicKeyToPEM added in v1.0.1

func PublicKeyToPEM(publicKey interface{}) ([]byte, error)

PublicKeyToPEM marshals a public key to the 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