keys

package
v0.0.0-...-682d07f Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeySpaceID

type KeySpaceID int

KeySpaceID identifies a key space

const (
	RainsKeySpace KeySpaceID = 0
)

func (KeySpaceID) String

func (i KeySpaceID) String() string

type PrivateKey

type PrivateKey struct {
	PublicKeyID
	Key interface{}
}

PrivateKey contains information about a private key

func (PrivateKey) String

func (p PrivateKey) String() string

String implements Stringer interface

type PublicKey

type PublicKey struct {
	PublicKeyID
	ValidSince int64
	ValidUntil int64
	Key        interface{}
}

PublicKey contains information about a public key

func (PublicKey) CompareTo

func (p PublicKey) CompareTo(pkey PublicKey) int

CompareTo compares two publicKey objects and returns 0 if they are equal, 1 if p is greater than pkey and -1 if p is smaller than pkey

func (PublicKey) Hash

func (p PublicKey) Hash() string

Hash returns a string containing all information uniquely identifying a public key.

func (PublicKey) String

func (p PublicKey) String() string

String implements Stringer interface

type PublicKeyID

type PublicKeyID struct {
	//Algorithm determines the signature algorithm to be used for signing and verification
	Algorithm algorithmTypes.Signature
	//KeySpace is an identifier of a key space
	KeySpace KeySpaceID
	//KeyPhase defines the keyPhase in which this public key is valid
	KeyPhase int
}

PublicKeyID contains all necessary information to distinguish different public keys from the same authority

func (PublicKeyID) Hash

func (p PublicKeyID) Hash() string

Hash returns a string containing all information uniquely identifying a public key ID.

func (PublicKeyID) String

func (p PublicKeyID) String() string

Jump to

Keyboard shortcuts

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