mattosaurus / PgpCore

.NET Core class library for using PGP
MIT License
245 stars 98 forks source link

Decrypt stream output is disposed object? #167

Closed premsonbaby closed 2 years ago

premsonbaby commented 2 years ago

The output of the following async method is disposed stream.

public Task DecryptStreamAsync(Stream inputStream, Stream outputStream);

There is no point of this outputStream if its disposed , it is creating file on disk, but it will be helpful to use the outputStream if its not empty for further stream related actions after decryption. Rather than reading the decrypted file again from disk.

thanks.

mattosaurus commented 2 years ago

This outputs a stream to wherever you want it.

https://github.com/mattosaurus/PgpCore#decryptstreamasync

The example writes to a FileStream but you could output to a MemoryStream or similar if you wanted.

premsonbaby commented 2 years ago

thank you.