lib/aws-sdk-resources/services/s3/encryption/utils.rb in aws-sdk-resources-2.3.12 vs lib/aws-sdk-resources/services/s3/encryption/utils.rb in aws-sdk-resources-2.3.13
- old
+ new
@@ -55,11 +55,11 @@
# @param [String] block_mode "CBC" or "ECB"
# @param [OpenSSL::PKey::RSA, String, nil] key
# @param [String, nil] iv The initialization vector
def aes_cipher(mode, block_mode, key, iv)
cipher = key ?
- OpenSSL::Cipher.new("AES-#{cipher_size(key)}-#{block_mode}") :
- OpenSSL::Cipher.new("AES-256-#{block_mode}")
+ OpenSSL::Cipher.new("aes-#{cipher_size(key)}-#{block_mode.downcase}") :
+ OpenSSL::Cipher.new("aes-256-#{block_mode.downcase}")
cipher.send(mode) # encrypt or decrypt
cipher.key = key if key
cipher.iv = iv if iv
cipher
end