class Aws::S3::EncryptionV2::EncryptHandler
def apply_encryption_cipher(context, cipher)
def apply_encryption_cipher(context, cipher) io = context.params[:body] || '' io = StringIO.new(io) if io.is_a? String 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) raise ArgumentError, 'Setting content_md5 on client side '\ 'encrypted objects is deprecated.' end context.http_response.on_headers do context.params[:body].close end end