In the recommended section, you should suggest the use of StreamReader instead of manually iterating over the Stream :
using (var plainTextReader = new StreamReader(cryptoStream))
{
return plainTextReader.ReadToEnd();
}
reference : https://stackoverflow.com/questions/69911084/problem-updating-to-net-6-encrypting-string
Thanks !
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
In the recommended section, you should suggest the use of StreamReader instead of manually iterating over the Stream :
using (var plainTextReader = new StreamReader(cryptoStream))
{
return plainTextReader.ReadToEnd();
}
reference : https://stackoverflow.com/questions/69911084/problem-updating-to-net-6-encrypting-string
Thanks !
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.