Method: Aws::S3::EncryptionV2::IOEncrypter#initialize

Defined in:
lib/aws-sdk-s3/encryptionV2/io_encrypter.rb

#initialize(cipher, io) ⇒ IOEncrypter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of IOEncrypter.



17
18
19
20
21
22
# File 'lib/aws-sdk-s3/encryptionV2/io_encrypter.rb', line 17

def initialize(cipher, io)
  @encrypted = io.size <= ONE_MEGABYTE ?
    encrypt_to_stringio(cipher, io.read) :
    encrypt_to_tempfile(cipher, io)
  @size = @encrypted.size
end