Documentation ¶
Index ¶
- func GetSHA256Op(name string) *cryptOp
- type Attestation
- type BitcoinAttestation
- type DetachedTimestamp
- func CreateDetachedTimestampForFile(path string, cal *RemoteCalendar) (*DetachedTimestamp, error)
- func CreateDetachedTimestampForHash(digest []byte, cal *RemoteCalendar) (*DetachedTimestamp, error)
- func NewDetachedTimestamp(hashOp cryptOp, fileHash []byte, ts *Timestamp) (*DetachedTimestamp, error)
- func NewDetachedTimestampFromPath(p string) (*DetachedTimestamp, error)
- func NewDetachedTimestampFromReader(r io.Reader) (*DetachedTimestamp, error)
- type PendingTimestamp
- type RemoteCalendar
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSHA256Op ¶
func GetSHA256Op(name string) *cryptOp
Types ¶
type Attestation ¶
type Attestation interface {
// contains filtered or unexported methods
}
func ParseAttestation ¶
func ParseAttestation(ctx *deserializationContext) (Attestation, error)
type BitcoinAttestation ¶
type BitcoinAttestation struct { Height uint64 // contains filtered or unexported fields }
func (*BitcoinAttestation) String ¶
func (b *BitcoinAttestation) String() string
func (*BitcoinAttestation) VerifyAgainstBlockHash ¶
func (b *BitcoinAttestation) VerifyAgainstBlockHash( digest, blockMerkleRootHash []byte, ) error
type DetachedTimestamp ¶
func CreateDetachedTimestampForFile ¶
func CreateDetachedTimestampForFile( path string, cal *RemoteCalendar, ) (*DetachedTimestamp, error)
func CreateDetachedTimestampForHash ¶
func CreateDetachedTimestampForHash(digest []byte, cal *RemoteCalendar) (*DetachedTimestamp, error)
func NewDetachedTimestamp ¶
func NewDetachedTimestamp( hashOp cryptOp, fileHash []byte, ts *Timestamp, ) (*DetachedTimestamp, error)
func NewDetachedTimestampFromPath ¶
func NewDetachedTimestampFromPath(p string) (*DetachedTimestamp, error)
func NewDetachedTimestampFromReader ¶
func NewDetachedTimestampFromReader(r io.Reader) (*DetachedTimestamp, error)
func (*DetachedTimestamp) Dump ¶
func (d *DetachedTimestamp) Dump() string
func (*DetachedTimestamp) WriteToStream ¶
func (d *DetachedTimestamp) WriteToStream(w io.Writer) error
type PendingTimestamp ¶
type PendingTimestamp struct { Timestamp *Timestamp PendingAttestation *pendingAttestation }
func PendingTimestamps ¶
func PendingTimestamps(ts *Timestamp) (res []PendingTimestamp)
func (PendingTimestamp) Upgrade ¶
func (p PendingTimestamp) Upgrade() (*Timestamp, error)
type RemoteCalendar ¶
type RemoteCalendar struct {
// contains filtered or unexported fields
}
func NewRemoteCalendar ¶
func NewRemoteCalendar(baseURL string) (*RemoteCalendar, error)
func (*RemoteCalendar) GetTimestamp ¶
func (c *RemoteCalendar) GetTimestamp(commitment []byte) (*Timestamp, error)
type Timestamp ¶
type Timestamp struct { Message []byte Attestations []Attestation // contains filtered or unexported fields }
A Timestamp can contain many attestations and operations.
func NewTimestampFromReader ¶
func (*Timestamp) DumpIndent ¶
func (*Timestamp) DumpWithConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.