notary

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

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidSignature

func ValidSignature(pubKey string, payload, signature []byte) (bool, error)

Types

type Notary

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

func NewNotary

func NewNotary(ecCertFile string) (*Notary, error)

func (*Notary) SignPayload

func (n *Notary) SignPayload(p []byte) (SignedPayload, error)

type SignedPayload

type SignedPayload struct {
	Ts        string
	Payload   []byte
	Hash      []byte
	Signature []byte
}

func (SignedPayload) MarshalJSON

func (s SignedPayload) MarshalJSON() ([]byte, error)

type SignedPayloadJSON

type SignedPayloadJSON struct {
	Timestamp string
	Payload   string
	Hash      string
	Signature string
}

func UnmarshalJSON

func UnmarshalJSON(b []byte) (SignedPayloadJSON, error)

Jump to

Keyboard shortcuts

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