seal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package seal applies the Inkless platform seal to a PDF as one incremental update: an optional signing summary page and a certification signature with an RFC 3161 signature timestamp (PAdES baseline B-T).

Index

Constants

View Source
const Reason = "Sealed by Inkless: this file and its evidence were issued unchanged. Signer actions are recorded in the evidence package."

Reason is the signature reason recorded in every seal.

Variables

This section is empty.

Functions

func Check

func Check(original []byte) (err error)

Check reports whether original can be sealed with a summary page, using a throwaway key and no timestamp. Run it when a document is uploaded.

func Seal

func Seal(ctx context.Context, original []byte, o Options) ([]byte, error)

Seal returns original followed by an incremental update carrying the summary page and the seal, so the first len(original) bytes of the result equal original. original must have passed pdf.Inspect, whose byte-level scan guards the PDF parser against hostile structure.

Types

type Options

type Options struct {
	// Signer holds the private key of Chain[0]; it signs once per seal.
	Signer crypto.Signer
	// Chain is the seal certificate followed by its intermediates.
	Chain []*x509.Certificate
	// TSAURL is the RFC 3161 endpoint that timestamps the signature.
	TSAURL string
	// At is the signing time recorded in the signature dictionary.
	At time.Time
	// Summary, if set, is added as a final page; the first line is its title.
	Summary []string
}

Options configures Seal.

Jump to

Keyboard shortcuts

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