Documentation ¶
Index ¶
- func FormatCheckpoint(c Checkpoint) string
- func NewVerifierFromSigner(skey string) (note.Verifier, error)
- func RightEdge(n int64) []int64
- type Checkpoint
- type CosignatureV1Signer
- func (v *CosignatureV1Signer) KeyHash() uint32
- func (v *CosignatureV1Signer) Name() string
- func (s *CosignatureV1Signer) Sign(msg []byte) ([]byte, error)
- func (s *CosignatureV1Signer) Verifier() note.Verifier
- func (v *CosignatureV1Signer) VerifierKey() string
- func (v *CosignatureV1Signer) Verify(msg, sig []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCheckpoint ¶
func FormatCheckpoint(c Checkpoint) string
func RightEdge ¶
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) Verifier ¶
func (s *CosignatureV1Signer) Verifier() note.Verifier
func (*CosignatureV1Signer) VerifierKey ¶ added in v0.3.0
func (v *CosignatureV1Signer) VerifierKey() string
Click to show internal directories.
Click to hide internal directories.