signedcommit

package
v0.1.171 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package signedcommit extracts commit signing payloads and signatures from raw commit object bodies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

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

Commit represents the payload and signatures parsed from a raw comit object.

func Parse

func Parse(body []byte) (*Commit, error)

Parse parses one raw commit object body for signature extraction.

The returned Commit remains valid only while body remains unchanged.

Labels: Deps-Borrowed, Life-Parent.

func (*Commit) Algorithms

func (commit *Commit) Algorithms() []objectid.Algorithm

Algorithms returns the algorithms for which the commit carries signatures.

func (*Commit) AppendPayload

func (commit *Commit) AppendPayload(dst []byte) []byte

AppendPayload appends the commit verification payload to dst, omitting all embedded signature headers.

func (*Commit) AppendSignature

func (commit *Commit) AppendSignature(dst []byte, algo objectid.Algorithm) ([]byte, bool)

AppendSignature appends the unfolded signature for algo to dst.

Jump to

Keyboard shortcuts

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