Documentation ¶
Index ¶
- Constants
- func PGPArmoredDetachSign(message io.Reader, keyFile, passphrase string) ([]byte, error)
- func PGPArmoredDetachSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKeyID *string) ([]byte, error)
- func PGPClearSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKeyID *string) ([]byte, error)
- func PGPReadMessage(message []byte, armoredPubKeyFile string) (plaintext []byte, err error)
- func PGPSignerWithKeyID(keyFile, passphrase string, hexKeyID *string) func([]byte) ([]byte, error)
- func PGPVerify(message io.Reader, signature []byte, armoredPubKeyFile string) error
- func RSASignSHA1Digest(sha1Digest []byte, keyFile, passphrase string) ([]byte, error)
- func RSAVerifySHA1Digest(sha1Digest, signature []byte, publicKeyFile string) error
Constants ¶
const ( PKCS1PrivkeyPreamble = "RSA PRIVATE KEY" PKCS8PrivkeyPreamble = "PRIVATE KEY" )
Variables ¶
This section is empty.
Functions ¶
func PGPArmoredDetachSign ¶
PGPArmoredDetachSign creates an ASCII-armored detached signature.
func PGPArmoredDetachSignWithKeyID ¶ added in v2.4.0
func PGPArmoredDetachSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKeyID *string) ([]byte, error)
PGPArmoredDetachSignWithKeyID creates an ASCII-armored detached signature.
func PGPClearSignWithKeyID ¶ added in v2.16.0
func PGPReadMessage ¶ added in v2.16.0
func PGPSignerWithKeyID ¶ added in v2.4.0
PGPSignerWithKeyID returns a PGP signer that creates a detached non-ASCII-armored signature and is compatible with rpmpack's signature API.
func PGPVerify ¶
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 ¶
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 ¶
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.