publickey

package
v0.0.0-...-f0b43a4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(key []byte) (*ecdsa.PublicKey, error)

Decode returns the public key from a given PEM-Encoded byte slice representation of the public key or a non-nil error if fail

func Encode

func Encode(key *ecdsa.PublicKey) ([]byte, error)

Encode returns the PEM-Encoded byte slice from a given public key or a non-nil error if fail

Types

type AurumPublicKey

type AurumPublicKey struct {
	Key   *ecdsa.PublicKey
	Bytes []byte
	Hex   string
	Hash  []byte
}

AurumPublicKey struct holds public key for user

func New

func New(key *ecdsa.PrivateKey) (AurumPublicKey, error)

New returns an AurumPublicKey given a ecdsa.PrivateKey

func NewFromPublic

func NewFromPublic(key *ecdsa.PublicKey) (AurumPublicKey, error)

NewFromPublic returns an AurumPublicKey given a ecdsa.PublicKey

func (AurumPublicKey) Equals

func (pbKey AurumPublicKey) Equals(pbKey2 *ecdsa.PublicKey) bool

Equals returns true if the given two *ecdsa.PublicKey are equal

Jump to

Keyboard shortcuts

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