tlogx

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCheckpoint

func FormatCheckpoint(c Checkpoint) string

func NewVerifierFromSigner

func NewVerifierFromSigner(skey string) (note.Verifier, error)

func RightEdge

func RightEdge(n int64) []int64

RightEdge returns the stored hash indexes of the right edge of a tree of size n. These are the same hashes that are combined into a tlog.TreeHash and allow producing record and tree proofs for any size bigger than n. See tlog.StoredHashIndex for the definition of stored hash indexes.

Types

type Checkpoint

type Checkpoint struct {
	Origin string
	tlog.Tree

	// Extension is empty or a sequence of non-empty lines,
	// each terminated by a newline character.
	Extension string
}

A Checkpoint is a tree head to be formatted according to c2sp.org/checkpoint.

A checkpoint looks like this:

example.com/origin
923748
nND/nri/U0xuHUrYSy0HtMeal2vzD9V4k/BO79C+QeI=

It can be followed by extra extension lines.

func ParseCheckpoint

func ParseCheckpoint(text string) (Checkpoint, error)

type CosignatureV1Signer

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

func NewCosignatureV1Signer

func NewCosignatureV1Signer(name string, key crypto.Signer) (*CosignatureV1Signer, error)

NewCosignatureV1Signer constructs a new CosignatureV1Signer that produces timestamped cosignature/v1 signatures from an Ed25519 private key.

func (*CosignatureV1Signer) KeyHash

func (v *CosignatureV1Signer) KeyHash() uint32

func (*CosignatureV1Signer) Name

func (v *CosignatureV1Signer) Name() string

func (*CosignatureV1Signer) Sign

func (s *CosignatureV1Signer) Sign(msg []byte) ([]byte, error)

func (*CosignatureV1Signer) Verifier

func (s *CosignatureV1Signer) Verifier() note.Verifier

func (*CosignatureV1Signer) VerifierKey added in v0.3.0

func (v *CosignatureV1Signer) VerifierKey() string

func (*CosignatureV1Signer) Verify

func (v *CosignatureV1Signer) Verify(msg, sig []byte) bool

Jump to

Keyboard shortcuts

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