BlobClient.OpenReadAsync()
returns non seekable stream. When I pass this stream for PGP decyption it gives me below error message. Is there a way to make the blob stream from seekable. I don't want to download file from blob storage account.
var containerClient =_blobServiceClient.GetBlobContainerClient(sourceContainer);
using var pgpStream = await containerClient.GetBlobClient(blobName).OpenReadAsync();
var privateKeyEncoded = Encoding.UTF8.GetString(Convert.FromBase64String(_options.PrivateKey));
Stream outputStream = new MemoryStream();
var privatekeyStreamEncoded = GenerateStreamFromString(privateKeyEncoded);
var deryptedStream= await pgp.DecryptStreamAsync(pgpStream, outputStream, PgpUtilities.GetDecoderStream(privatekeyStreamEncoded), _options.PassPhrase);
Error:
System.Private.CoreLib: Exception while executing function: DecryptPGPFile. BouncyCastle.Crypto: inputStream must be seek-able (Parameter 'inputStream').