Class: BB8::SetEncryptionKeys

Inherits:
Object
  • Object
show all
Defined in:
lib/bb8/set_encryption_keys.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject



2
3
4
# File 'lib/bb8/set_encryption_keys.rb', line 2

def self.call
  new.call
end

Instance Method Details

#callObject



6
7
8
9
10
11
# File 'lib/bb8/set_encryption_keys.rb', line 6

def call
  return if bundle.variables['BB8_SECRET_KEY']

  bundle.set 'BB8_SECRET_KEY', SecureRandom.hex(16)
  bundle.set 'BB8_SECRET_IV',  SecureRandom.hex(8)
end