class Aws::S3::Encryption::EncryptHandler

def apply_encryption_cipher(context, cipher)

def apply_encryption_cipher(context, cipher)
  io = context.params[:body] || ''
  io = StringIO.new(io) if String === io
  context.params[:body] = IOEncrypter.new(cipher, io)
  context.params[:metadata] ||= {}
  context.params[:metadata]['x-amz-unencrypted-content-length'] = io.size
  if context.params.delete(:content_md5)
    warn('Setting content_md5 on client side encrypted objects is deprecated')
  end
  context.http_response.on_headers do
    context.params[:body].close
  end
end