lib/symmetric_encryption/reader.rb in symmetric-encryption-0.7.0 vs lib/symmetric_encryption/reader.rb in symmetric-encryption-0.7.1

- old
+ new

@@ -129,9 +129,21 @@ # ensure that the encrypted stream is closed before the stream itself is closed def close(close_child_stream = true) @ios.close if close_child_stream end + # Flush the read stream + # Needed by XLS gem + def flush + @ios.flush + end + + # Return the size of the file rounded up to the nearest encryption block size + # Needed by XLS gem + def size + @ios.size + end + # Read from the stream and return the decrypted data # See IOS#read # # Reads at most length bytes from the I/O stream, or to the end of file if # length is omitted or is nil. length must be a non-negative integer or nil.