lib/fernet/legacy/generator.rb in legacy-fernet-1.6.3 vs lib/fernet/legacy/generator.rb in legacy-fernet-1.6.4
- old
+ new
@@ -44,10 +44,10 @@
def encrypt_data!
cipher = OpenSSL::Cipher.new('AES-128-CBC')
cipher.encrypt
iv = cipher.random_iv
cipher.iv = iv
- cipher.key = encryption_key
+ cipher.key = encryption_key[0, 16]
@data = cipher.update(MultiJson.dump(data)) + cipher.final
iv
end
def base64(chars)