Skip to content

Commit 0124dbc

Browse files
authored
Fix unintended closure in RsaPaddingProcessor.OpenProcessor (#50377)
1 parent c7ab19e commit 0124dbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ private static int GetHashSizeInBytes(HashAlgorithmName hashAlgorithm)
3232
{
3333
return s_hashSizes.GetOrAdd(
3434
hashAlgorithm,
35-
alg =>
35+
static hashAlgorithm =>
3636
{
37-
using (HashProviderCng hashProvider = new HashProviderCng(alg.Name!, null))
37+
using (HashProviderCng hashProvider = new HashProviderCng(hashAlgorithm.Name!, null))
3838
{
3939
return hashProvider.HashSizeInBytes;
4040
}

src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ internal static RsaPaddingProcessor OpenProcessor(HashAlgorithmName hashAlgorith
7474
{
7575
return s_lookup.GetOrAdd(
7676
hashAlgorithmName,
77-
alg =>
77+
static hashAlgorithmName =>
7878
{
7979
using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName))
8080
{

0 commit comments

Comments
 (0)