keys

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 8 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) MarshalJSON

func (r KeySpaceID) MarshalJSON() ([]byte, error)

MarshalJSON is generated so KeySpaceID satisfies json.Marshaler.

func (KeySpaceID) String

func (i KeySpaceID) String() string

func (*KeySpaceID) UnmarshalJSON

func (r *KeySpaceID) UnmarshalJSON(data []byte) error

UnmarshalJSON is generated so KeySpaceID satisfies json.Unmarshaler.

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