sign

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PGPArmoredDetachSign

func PGPArmoredDetachSign(message io.Reader, keyFile, passphrase string) ([]byte, error)

PGPArmoredDetachSign creates an ASCII-armored detached signature.

func PGPSigner

func PGPSigner(keyFile, passphrase string) func([]byte) ([]byte, error)

PGPSigner returns a PGP signer that creates a detached non-ASCII-armored signature and is compatible with rpmpack's signature API.

func PGPVerify

func PGPVerify(message io.Reader, signature []byte, armoredPubKeyFile string) error

PGPVerify is exported for use in tests and verifies a ASCII-armored or non-ASCII-armored signature using an ASCII-armored or non-ASCII-armored public key file. The signer identity is not explicitly checked, other that the obvious fact that the signer's key must be in the armoredPubKeyFile.

func RSASignSHA1Digest

func RSASignSHA1Digest(sha1Digest []byte, keyFile, passphrase string) ([]byte, error)

RSASignSHA1Digest signs the provided SHA1 message digest. The key file must be in the PEM format and can either be encrypted or not.

func RSAVerifySHA1Digest

func RSAVerifySHA1Digest(sha1Digest, signature []byte, publicKeyFile string) error

RSAVerifySHA1Digest is exported for use in tests and verifies a signature over the provided SHA1 hash of a message. The key file must be in the PEM format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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