Skip to content

Commit

Permalink
Updated example to fix compile issue
Browse files Browse the repository at this point in the history
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
  • Loading branch information
WhitWaldo committed Jan 3, 2024
1 parent 653a354 commit db37b93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public override async Task RunAsync(CancellationToken cancellationToken)
}
Console.WriteLine();

//Encrypt the file
//Encrypt from a file stream
await using var encryptFs = new FileStream(fileName, FileMode.Open);
#pragma warning disable CS0618 // Type or member is obsolete
var encryptedBytesResult = await client.EncryptAsync(componentName, encryptFs, keyName, new EncryptionOptions(KeyWrapAlgorithm.Rsa)
Expand All @@ -55,7 +55,7 @@ public override async Task RunAsync(CancellationToken cancellationToken)
Console.WriteLine("Decrypted value:");
await using var decryptedMs = new MemoryStream(decryptedBytes.ToArray());
using var sr = new StreamReader(decryptedMs);
Console.WriteLine(await sr.ReadToEndAsync(cancellationToken));
Console.WriteLine(await sr.ReadToEndAsync());
}
}
}

0 comments on commit db37b93

Please sign in to comment.