def close(close_child_stream = true)
      return if closed?

      if size.positive?
        final = @stream_cipher.final
        @ios.write(final) unless final.empty?
      end
      @ios.close if close_child_stream
      @closed = true
    end
def close(close_child_stream = true)
      return if closed?

      if size.positive?
        final = @stream_cipher.final
        @ios.write(final) unless final.empty?
      end
      @ios.close if close_child_stream
      @closed = true
    end
Encrypt data before writing to the supplied stream
 Close the IO Stream.

 Notes:
 * Flushes any unwritten data.
 * Once an EncryptionWriter has been closed a new instance must be
   created before writing again.
 * Closes the passed in io stream or file.
 * `close` must be called _before_ the supplied stream is closed.

 It is recommended to call Symmetric::EncryptedStream.open
 rather than creating an instance of Symmetric::Writer directly to
 ensure that the encrypted stream is closed before the stream itself is closed.