sign

package
v0.0.0-...-2bc72fa Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 17 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 PGPArmoredDetachSignWithKeyID

func PGPArmoredDetachSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKeyId *string) ([]byte, error)

PGPArmoredDetachSignWithKeyID creates an ASCII-armored detached signature.

func PGPClearSignWithKeyID

func PGPClearSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKeyId *string) ([]byte, error)

func PGPReadMessage

func PGPReadMessage(message []byte, armoredPubKeyFile string) error

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 PGPSignerWithKeyID

func PGPSignerWithKeyID(keyFile, passphrase string, hexKeyId *string) func([]byte) ([]byte, error)

PGPSignerWithKeyID 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 an 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