Documentation
¶
Overview ¶
Package pgp contains the logic related to the PGP key management.
Index ¶
- Constants
- type Key
- func (p *Key) Armor() (string, error)
- func (p *Key) ArmorPublic() (string, error)
- func (p *Key) Fingerprint() string
- func (p *Key) IsExpired(clockSkew time.Duration) bool
- 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 ¶
View Source
const ( MaxAllowedLifetime = 8 * time.Hour AllowedClockSkew = 5 * time.Minute )
Time-related key settings.
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) IsExpired ¶ added in v0.2.1
IsExpired returns true if the key is expired with clock skew.
func (*Key) IsUnlocked ¶
IsUnlocked returns true if the private key is unlocked.
Click to show internal directories.
Click to hide internal directories.