Skip to content

Commit eb0c75e

Browse files
committed
1 parent 7308430 commit eb0c75e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ICSharpCode.SharpZipLib/Encryption/ZipAESStream.cs

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
using System;
55
using System.IO;
66
using System.Security.Cryptography;
7+
using System.Threading;
8+
using System.Threading.Tasks;
79

810
namespace ICSharpCode.SharpZipLib.Encryption
911
{
@@ -92,6 +94,13 @@ public override int Read(byte[] buffer, int offset, int count)
9294
return nBytes;
9395
}
9496

97+
/// <inheritdoc/>
98+
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
99+
{
100+
var readCount = Read(buffer, offset, count);
101+
return Task.FromResult(readCount);
102+
}
103+
95104
// Read data from the underlying stream and decrypt it
96105
private int ReadAndTransform(byte[] buffer, int offset, int count)
97106
{

0 commit comments

Comments
 (0)