dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
725 stars 1.56k forks source link

Fix use of CryptoStream examples #10470

Closed vcsjones closed 1 month ago

vcsjones commented 1 month ago

Summary

The example code read from the backing MemoryStream before the CryptoStream flushed the final block to the underlying stream.

Fixes #10119

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones

learn-build-service-prod[bot] commented 1 month ago

Learn Build status updates of commit cfe9ad0:

:white_check_mark: Validation status: passed

File Status Preview URL Details
snippets/csharp/System.Security.Cryptography/Aes/Overview/program.cs :white_check_mark:Succeeded View
snippets/csharp/System.Security.Cryptography/AesCryptoServiceProvider/Overview/program.cs :white_check_mark:Succeeded View
snippets/csharp/System.Security.Cryptography/AesManaged/Overview/program.cs :white_check_mark:Succeeded View
snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs :white_check_mark:Succeeded View

For more details, please refer to the build report.

For any questions, please: