Package gpg has procedures for dealing with GNU Privacy Guard (gpg), in service of signing commits.
ImportKeys looks for all keys in a directory, and imports them into the current user's keyring. A path to a directory or a file may be provided. If the path is a directory, regular files in the directory will be imported, but not subdirectories (i.e., no recursion). It returns the basenames of the successfully imported keys.