sighandler

package
v0.0.0-...-73e6ce1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 12 Imported by: 0

Documentation

Overview

Package sighandler implements digital signature handlers for PDF signature validation and signing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdobePKCS7Detached

func NewAdobePKCS7Detached(privateKey *rsa.PrivateKey, certificate *x509.Certificate) (model.SignatureHandler, error)

NewAdobePKCS7Detached creates a new Adobe.PPKMS/Adobe.PPKLite adbe.pkcs7.detached signature handler. Both parameters may be nil for the signature validation.

func NewAdobeX509RSASHA1

func NewAdobeX509RSASHA1(privateKey *rsa.PrivateKey, certificate *x509.Certificate) (model.SignatureHandler, error)

NewAdobeX509RSASHA1 creates a new Adobe.PPKMS/Adobe.PPKLite adbe.x509.rsa_sha1 signature handler. Both parameters may be nil for the signature validation.

func NewAdobeX509RSASHA1Custom

func NewAdobeX509RSASHA1Custom(certificate *x509.Certificate, signFunc SignFunc) (model.SignatureHandler, error)

NewAdobeX509RSASHA1Custom creates a new Adobe.PPKMS/Adobe.PPKLite adbe.x509.rsa_sha1 signature handler with a custom signing function. Both parameters may be nil for the signature validation.

func NewEmptyAdobePKCS7Detached

func NewEmptyAdobePKCS7Detached(signatureLen int) (model.SignatureHandler, error)

NewEmptyAdobePKCS7Detached creates a new Adobe.PPKMS/Adobe.PPKLite adbe.pkcs7.detached signature handler. The generated signature is empty and of size signatureLen. The signatureLen parameter can be 0 for the signature validation.

Types

type SignFunc

type SignFunc func(sig *model.PdfSignature, digest model.Hasher) ([]byte, error)

SignFunc represents a custom signing function. The function should return the computed signature.

Jump to

Keyboard shortcuts

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