lib/heirloom/cipher/file.rb in heirloom-0.5.0rc3 vs lib/heirloom/cipher/file.rb in heirloom-0.5.0rc4
- old
+ new
@@ -16,10 +16,10 @@
output = Tempfile.new('archive.tar.gz.enc')
iv = @aes.random_iv
@aes.encrypt
@aes.iv = iv
- @aes.key = secret
+ @aes.key = Digest::SHA256.hexdigest secret
# Need to refactor to be less complex
# Additionally tests to do fully cover logic
::File.open(output,'w') do |enc|
enc << iv