Skip to content
/ rgpg Public

Simple Ruby wrapper around "gpg" command for file encryption

License

Notifications You must be signed in to change notification settings

eahanson/rgpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgpg Install gem Build status

A simple Ruby wrapper around gpg command for file encryption

rgpg is a simple API for interacting with the gpg tool. It is specifically designed to avoid altering global keyring state by creating temporary public and secret keyrings on the fly for encryption and decryption.

Installation

gem install rgpg

Usage from terminal

This gem adds an rgpg command. Type rgpg for usage information.

API usage

To generate a GPG public-private key pair

require 'rgpg'

Rgpg::GpgHelper.generate_key_pair 'mykey', '[email protected]', 'Joe Bloggs'

To encrypt a file

require 'rgpg'

Rgpg::GpgHelper.encrypt_file 'mykey.pub', 'myfile.txt', 'myfile.txt.enc'

To decrypt a file

require 'rgpg'

Rgpg::GpgHelper.decrypt_file 'mykey.pub', 'mykey.sec', 'myfile.txt.enc', 'myfile.txt' [, 'secret_key_passphrase']

Licence

rgpg is released under the MIT licence.

About

Simple Ruby wrapper around "gpg" command for file encryption

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages