TomPoulton/hiera-eyaml — pull request #4 by gtmtech (2013-07-19 14:35:32+00:00)
Title: Fix for issue 3 - proper gemspec and slight change of encryption method

In answer to Issue 3:

https://github.com/TomPoulton/hiera-eyaml/issues/3

I have created this pull request which does the following:

* Replace the RSA keys with RSA+X509 cert, and change the encryption method to AES256 symmetric PKCS7 format. This allows arbitrary length strings to be encrypted, and can encrypt e.g. an id_rsa file whereas the previous method could not. I have kept the same interface

* In order to encrypt you need the public_key, in order to decrypt you need both public and private keys (There should be a way to just do it with the private key but I havent worked out how)

* I have written a proper gemspec file which includes the executables in bin. You will now need bundler installed to make the gem, but this is best practice anyway (gem install bundler before you start). You can build the gem with "rake build".

* When the gem is installed, you have instant access to "eyaml" comand which can manage all the keys and is a handy tool for encryption: eyaml --help for usage instructions.

e.g. to create keys: eyaml -c

e.g. to encrypt something: eyaml -e "some string"

It also outputs in exactly the format required by the yaml file as described by previous READMEs