master-crypt

Usage

Encrypting data with a master key

master_key = "Very secure & random master k3y"
other_secret_key = "Another very secure & random master k3y"
data = "Secret data..."
master_crypt = MasterCrypt.new(master_key)

encrypted_data = master_crypt.master_key_encrypt(data, [other_secret_key])
# encrypted_data can be decrypted with either the master_key or other_secret_key

Decrypting data with a master key

master_key = "Very secure & random master k3y"
encrypted_data = "...."
master_crypt = MasterCrypt.new(master_key)

plaintext = master_crypt.master_key_decrypt(encrypted_data)

Development

bundle install

Specs

Run all specs + standardrb

bundle exec rake

Run specs using guard

bundle exec guard