bc-csharp
bc-csharp copied to clipboard
PgpUtilities.GetDecoderStream() requiring a seekable stream
I am writing an Azure Function to decrypt a previously encrypted file stored in an Azure Blob. Ideally, I would like to use the OpenWrite/Read methods on BlobBlockClient in order to avoid downloading and encrypting in memory. However, those methods return a non-seekable stream.
I am using PgpCore as a wrapper over BouncyCastle and it is internally calling PgpUtilities.GetDecoderStream(), which apparently throws immediately : https://github.com/bcgit/bc-csharp/blob/5bd4c8c70f80f1e7ead8e3c73459b78eb93d0ef7/crypto/src/openpgp/PgpUtilities.cs#L414-L429
Would it be possible to remove the check?