Module Gpgr::Keys
In: lib/gpgr.rb

Encapsulates all the functionality for dealing with GPG Keys. There isn‘t much here since key managment isn‘t really one of the goals of this project. It will, however, allow you to import new keys and provides a means to list existing installed keys.

Methods

Public Class methods

Imports the key at the specified path into the keyring. Since this is really running gpg —import ./path/to/key.asc, the key will be imported and added to the keyring for the user executing this command.

Iterates through all of the files at a specified path and attempts to import those which are likely to be GPG / PGP Public Keys.

Returns an array with the e-mail addresses of every installed public key for looping through and detecting if a particular key is installed.

Simply checks to see if the e-mail address passed through as an argument has a public key attached to it by checking in installed_public_keys.

[Validate]