lib/kafkr/encryptor.rb in kafkr-0.9.1 vs lib/kafkr/encryptor.rb in kafkr-0.10.0
- old
+ new
@@ -4,10 +4,10 @@
module Kafkr
class Encryptor
ALGORITHM = "aes-256-cbc"
def initialize
- @key = Base64.decode64("2wZ85yxQe0lmiQ5nsqdmPWoGB0W6HZW8S/UXVTLQ6WY=")
+ @key = Base64.decode64(ENV["KAFKR_ENCRYPTION_KEY"])
end
def encrypt(data)
cipher = OpenSSL::Cipher.new(ALGORITHM)
cipher.encrypt