cosign

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxWorkers int = 10
)

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) (bool, error)

Types

type DSSEAttestor

type DSSEAttestor interface {
	// Attest creates an attestation, in the form of an `oci.Signature`, from the given payload.
	// The signature and payload are stored as a DSSE envelope in `osi.Signature.Payload()`
	DSSEAttest(ctx context.Context, payload io.Reader) (oci.Signature, crypto.PublicKey, error)
}

DSSEAttestor creates attestations in the form of `oci.Signature`s

type HashReader

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

HashReader hashes while it reads.

func NewHashReader

func NewHashReader(r io.Reader, h hash.Hash) HashReader

func (*HashReader) BlockSize

func (h *HashReader) BlockSize() int

BlockSize implements hash.Hash.

func (*HashReader) Read

func (h *HashReader) Read(p []byte) (n int, err error)

Read implements io.Reader.

func (*HashReader) Reset

func (h *HashReader) Reset()

Reset implements hash.Hash.

func (*HashReader) Size

func (h *HashReader) Size() int

Size implements hash.Hash.

func (*HashReader) Sum

func (h *HashReader) Sum(p []byte) []byte

Sum implements hash.Hash.

func (*HashReader) Write

func (h *HashReader) Write(p []byte) (int, error)

Write implements hash.Hash

type Signer

type Signer interface {
	// Sign signs the given payload, returning the results as an `oci.Signature` which can be verified using the returned `crypto.PublicKey`.
	Sign(ctx context.Context, payload io.Reader) (oci.Signature, crypto.PublicKey, error)
}

Signer signs payloads in the form of `oci.Signature`s

Directories

Path Synopsis
tsa

Jump to

Keyboard shortcuts

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