timestamp

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeTimestamper added in v0.2.2

type FakeTimestamper struct {
	T time.Time
}

func (FakeTimestamper) Timestamp added in v0.2.2

func (ft FakeTimestamper) Timestamp(context.Context, io.Reader) ([]byte, error)

func (FakeTimestamper) Verify added in v0.2.2

func (ft FakeTimestamper) Verify(ctx context.Context, ts io.Reader, sig io.Reader) (time.Time, error)

type TSPTimestamper

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

func NewTimestamper

func NewTimestamper(opts ...TSPTimestamperOption) TSPTimestamper

func (TSPTimestamper) Timestamp

func (t TSPTimestamper) Timestamp(ctx context.Context, r io.Reader) ([]byte, error)

type TSPTimestamperOption

type TSPTimestamperOption func(*TSPTimestamper)

func TimestampWithHash

func TimestampWithHash(h crypto.Hash) TSPTimestamperOption

func TimestampWithRequestCertificate

func TimestampWithRequestCertificate(requestCertificate bool) TSPTimestamperOption

func TimestampWithUrl

func TimestampWithUrl(url string) TSPTimestamperOption

type TSPVerifier

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

func NewVerifier

func NewVerifier(opts ...TSPVerifierOption) TSPVerifier

func (TSPVerifier) Verify

func (v TSPVerifier) Verify(ctx context.Context, tsrData, signedData io.Reader) (time.Time, error)

type TSPVerifierOption

type TSPVerifierOption func(*TSPVerifier)

func VerifyWithCerts

func VerifyWithCerts(certs []*x509.Certificate) TSPVerifierOption

func VerifyWithHash

func VerifyWithHash(h crypto.Hash) TSPVerifierOption

type TimestampVerifier added in v0.2.2

type TimestampVerifier interface {
	Verify(context.Context, io.Reader, io.Reader) (time.Time, error)
}

type Timestamper added in v0.2.2

type Timestamper interface {
	Timestamp(context.Context, io.Reader) ([]byte, error)
}

Jump to

Keyboard shortcuts

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