Documentation
¶
Overview ¶
Package pgp contains the logic related to the PGP key management.
Index ¶
- type Key
- func (p *Key) Armor() (string, error)
- func (p *Key) ArmorPublic() (string, error)
- func (p *Key) Fingerprint() string
- func (p *Key) IsPrivate() bool
- func (p *Key) IsUnlocked() (bool, error)
- func (p *Key) Sign(data []byte) ([]byte, error)
- func (p *Key) Validate() error
- func (p *Key) Verify(data, signature []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key represents a PGP key. It can be a public key or a private & public key pair.
func GenerateKey ¶
GenerateKey generates a new PGP key pair.
func (*Key) ArmorPublic ¶
ArmorPublic returns only the public key in armored format.
func (*Key) Fingerprint ¶
Fingerprint returns the fingerprint of the key.
func (*Key) IsUnlocked ¶
IsUnlocked returns true if the private key is unlocked.
Click to show internal directories.
Click to hide internal directories.