Documentation ¶
Index ¶
- Variables
- func Decrypt(r io.Reader) (*models.MessageDetails, error)
- func Encrypt(r io.Reader, to []string, from string) ([]byte, error)
- func ExportPublicKey(k string) (io.Reader, error)
- func GetKeyId(s string) (string, error)
- func GetPrivateKeyId(s string) (string, error)
- func Import(r io.Reader) error
- func Sign(r io.Reader, from string) ([]byte, string, error)
- func Verify(m io.Reader, s io.Reader) (*models.MessageDetails, error)
- type GPGError
Constants ¶
This section is empty.
Variables ¶
View Source
var GPGErrors = map[string]GPGError{ "gpg: no valid openpgp data found.": ERROR_NO_PGP_DATA_FOUND, }
Functions ¶
func Decrypt ¶
func Decrypt(r io.Reader) (*models.MessageDetails, error)
Decrypt runs gpg --decrypt on the contents of r. If the packet is signed, the signature is also verified
func Encrypt ¶
Encrypt runs gpg --encrypt [--sign] -r [recipient]. The default is to have --trust-model always set
func ExportPublicKey ¶
ExportPublicKey exports the public key identified by k in armor format
func GetPrivateKeyId ¶
GetPrivateKeyId runs gpg --list-secret-keys s
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.