cosign

package
v1.3.0-next.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashData

func HashData(data []byte) []byte

func ParsePublicKey

func ParsePublicKey(pemEncodedPubKey []byte) (*ecdsa.PublicKey, error)

func VerifySignature

func VerifySignature(pubKey *ecdsa.PublicKey, hash, signature []byte) (bool, error)

VerifySignature verifies the signature of the data using the provided ECDSA public key.

Types

type Bundle

type Bundle struct {
	Signature   string `json:"base64Signature"`
	Certificate string `json:"cert"`
	RekorBundle Rekor  `json:"rekorBundle"`
}

type Payload

type Payload struct {
	Body           string `json:"body"`
	IntegratedTime int64  `json:"integratedTime"`
	LogIndex       int64  `json:"logIndex"`
	LogID          string `json:"logID"`
}

type Rekor

type Rekor struct {
	SignedEntryTimestamp string  `json:"SignedEntryTimestamp"`
	Payload              Payload `json:"Payload"`
}

Jump to

Keyboard shortcuts

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