Skip to content

Commit b83539c

Browse files
authored
Fix tests to use valid PBE iterations (#75240)
1 parent 69ddb97 commit b83539c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/System.Security.Cryptography/tests/AsymmetricAlgorithmTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public static void ExportPem_ExportEncryptedPkcs8PrivateKeyPem()
370370
PbeParameters expectedPbeParameters = new PbeParameters(
371371
PbeEncryptionAlgorithm.Aes256Cbc,
372372
HashAlgorithmName.SHA384,
373-
RandomNumberGenerator.GetInt32(0, 100_000));
373+
RandomNumberGenerator.GetInt32(1, 100_000));
374374

375375
byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, PbeParameters pbeParameters)
376376
{
@@ -407,7 +407,7 @@ public static void ExportPem_TryExportEncryptedPkcs8PrivateKeyPem()
407407
PbeParameters expectedPbeParameters = new PbeParameters(
408408
PbeEncryptionAlgorithm.Aes256Cbc,
409409
HashAlgorithmName.SHA384,
410-
RandomNumberGenerator.GetInt32(0, 100_000));
410+
RandomNumberGenerator.GetInt32(1, 100_000));
411411

412412
bool TryExportEncryptedPkcs8PrivateKey(
413413
ReadOnlySpan<char> password,

0 commit comments

Comments
 (0)