privatekey

package
v0.0.0-...-85e540a Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

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

PrivateKey represents a loaded ECDSA private key.

func FromBase64

func FromBase64(data string) (*PrivateKey, error)

FromBase64 loads an ECDSA private key from a base64 encoded string.

func FromBytes

func FromBytes(data []byte) (*PrivateKey, error)

FromBytes loads an ECDSA private key from PEM data.

func FromFile

func FromFile(file string) (*PrivateKey, error)

FromFile loads an ECDSA private key from a PEM file.

func (*PrivateKey) Bytes

func (p *PrivateKey) Bytes() []byte

Bytes returns the bytes of the ECDSA private key.

func (*PrivateKey) PrivateKey

func (p *PrivateKey) PrivateKey() *ecdsa.PrivateKey

PrivateKey returns the ECDSA private key.

func (*PrivateKey) PublicKey

func (p *PrivateKey) PublicKey() *ecdsa.PublicKey

PublicKey returns the ECDSA public key.

func (*PrivateKey) ToBase64

func (p *PrivateKey) ToBase64() string

ToBase64 saves the ECDSA private key to a base64 encoded string.

Jump to

Keyboard shortcuts

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