diff --git a/src/KeyKeeper/PasswordStore/Crypto/OuterEncryptionReader.cs b/src/KeyKeeper/PasswordStore/Crypto/OuterEncryptionReader.cs index cc05baa..f94e61d 100644 --- a/src/KeyKeeper/PasswordStore/Crypto/OuterEncryptionReader.cs +++ b/src/KeyKeeper/PasswordStore/Crypto/OuterEncryptionReader.cs @@ -23,7 +23,7 @@ public class OuterEncryptionReader : Stream public override long Position { get => position; - set => position = value; + set { throw new NotSupportedException(); } } public override long Length => throw new NotSupportedException(); @@ -42,7 +42,7 @@ public class OuterEncryptionReader : Stream /// /// Порядковый номер чанка, лежащего в . /// - private int currentChunkOrdinal = 0; + private int nextChunkOrdinal = 0; private bool isCurrentChunkLast; private long position = 0; @@ -148,7 +148,8 @@ public class OuterEncryptionReader : Stream { if (isCurrentChunkLast) return; - var chunk = PassStoreContentChunk.GetFromStream(file, key, currentChunkOrdinal); + var chunk = PassStoreContentChunk.GetFromStream(file, key, nextChunkOrdinal); + nextChunkOrdinal += 1; isCurrentChunkLast = chunk.IsLast; var encryptedData = chunk.GetContent(); EraseCurrentChunk();