keypem

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PrivPemType = "LIBP2P PRIVATE KEY"

PrivPemType is the expected header type on private keys.

View Source
const PubPemType = "LIBP2P PUBLIC KEY"

PubPemType is the expected header type on public keys.

Variables

This section is empty.

Functions

func MarshalPrivKeyPem

func MarshalPrivKeyPem(key crypto.PrivKey) ([]byte, error)

MarshalPrivKeyPem marshals a private key to pem.

func MarshalPubKeyPem

func MarshalPubKeyPem(key crypto.PubKey) ([]byte, error)

MarshalPubKeyPem marshals a public key to pem.

func ParsePrivKeyPem

func ParsePrivKeyPem(pemDat []byte) (crypto.PrivKey, error)

ParsePrivKeyPem parses a private key in pem format. If none is found returns nil

func ParsePubKeyPem

func ParsePubKeyPem(pemDat []byte) (crypto.PubKey, error)

ParsePubKeyPem parses a public key in pem format. If none is found returns nil

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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