crypto

package
v0.0.0-...-0ae050f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteRequests

func WriteRequests(reqs []Request, key *packet.PrivateKey) ([]byte, error)

Types

type Key

type Key struct {
	Expires   time.Time `json:"expire"`
	PublicKey string    `json:"key"`
	User      string    `json:"user"`
}

func (*Key) Equals

func (k *Key) Equals(key *Key) bool

func (*Key) Fingerprint

func (k *Key) Fingerprint() string

func (*Key) Shorten

func (k *Key) Shorten() *ShortKey

func (*Key) SigningData

func (k *Key) SigningData() ([]byte, error)

func (*Key) Validate

func (k *Key) Validate() error

type Request

type Request struct {
	Payload   []byte
	Signature *armor.Block
}

func ReadRequests

func ReadRequests(data []byte) ([]Request, error)

func (*Request) DecodeJSON

func (r *Request) DecodeJSON(into interface{}) error

func (*Request) EncodeJSON

func (r *Request) EncodeJSON(from interface{}) error

type ShortKey

type ShortKey struct {
	User        string `json:"user"`
	Fingerprint string `json:"fingerprint"`
}

Jump to

Keyboard shortcuts

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