mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-19 14:34:20 +00:00
improved smoothing, stricter IO impl during encryption
This commit is contained in:
+11
@@ -109,6 +109,17 @@ public class LengthObfuscatingInputStream extends FilterInputStream {
|
||||
throw new IOException("Skip not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
if (paddingLength == -1) {
|
||||
// EOF not yet reached; delegate original stream to answer this rather complicated question:
|
||||
return in.available();
|
||||
} else {
|
||||
// EOF already reached, read from remaining padding:
|
||||
return paddingLength - paddingBytesRead;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean markSupported() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user