Sha256: 0d88a59cc7941991da272537c62e8adcc0597103d95b517d1832926a7faf1362
Contents?: true
Size: 860 Bytes
Versions: 10
Compression:
Stored size: 860 Bytes
Contents
module SymmetricEncryption module Keystore # Heroku uses environment variables too. class Heroku < Environment # Returns [Hash] a new keystore configuration after generating the data key. def self.generate_data_key(**args) config = super(**args) config[:keystore] = :heroku config end # Write the encrypted Encryption key to `encrypted_key` attribute. def write(key) encrypted_key = key_encrypting_key.encrypt(key) puts "\n\n********************************************************************************" puts "Add the environment key to Heroku:\n\n" puts " heroku config:add #{key_env_var}=#{encoder.encode(encrypted_key)}" puts '********************************************************************************' end end end end
Version data entries
10 entries across 10 versions & 1 rubygems