Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.22 KB

README.md

File metadata and controls

53 lines (31 loc) · 1.22 KB

Knife::Crypt

Build History Dependency Status

Commands for Chef's Knife Command to Encrypt and Decrypt Data

The encrypt and decrypt knife commands uses the configured data bag secret to encrypt and decrypt data at the command line.

Installation

This plugin is distributed as a Ruby Gem. To install it, run:

$ gem install knife-crypt

Usage

Encrypt a string

$ knife encrypt '"foo"'

Encrypt an array

$ knife encrypt '["foo", "bar"]'

Encrypt a hash

$ knife encrypt '{"foo"=>{"bar"=>"baz"}}'

Decrypt to a string

$ knife decrypt e4ibEHAinGltDjYNQPV4rw==

Decrypt to an array

$ knife decrypt 7wrizj9MAjmSVWWq69DUql0hNHFv7Hp/1tnQ/NJuD08=

Decrypt to a hash

$ knife decrypt nsXFeAANrmnBNu+QPfOHZFB5szSRA+Ezu94fmrJnNhk=

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request