From 120dfc2f7135f12d731dbf8948aff391ce655406 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Mon, 1 Jun 2026 16:48:04 -0700 Subject: [PATCH 1/2] Remove opinions from Rfc2898DeriveBytes docs --- .../Rfc2898DeriveBytes/Overview/rfc28981.cs | 2 +- .../Rfc2898DeriveBytes.xml | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/snippets/csharp/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.cs b/snippets/csharp/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.cs index cae652faeff..386607219f2 100644 --- a/snippets/csharp/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.cs +++ b/snippets/csharp/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.cs @@ -35,7 +35,7 @@ public static void Main(string[] passwordargs) //data1 can be a string or contents of a file. string data1 = "Some test data"; // - //The default iteration count is 1000 so the two methods use the same iteration count. + //The legacy default iteration count is 1000 so the two methods use the same iteration count. int myIterations = 1000; // // diff --git a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml index c0740e00581..5602e6fc97e 100644 --- a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml +++ b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml @@ -321,7 +321,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf class can be used to produce a derived key from a base key and other parameters. In a password-based key derivation function, the base key is a password and the other parameters are a salt value and an iteration count. @@ -398,7 +398,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf class can be used to produce a derived key from a base key and other parameters. In a password-based key derivation function, the base key is a password and the other parameters are a salt value and an iteration count. @@ -482,7 +482,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf class can be used to produce a derived key from a base key and other parameters. In a password-based key derivation function, the base key is a password and the other parameters are a salt value and an iteration count. @@ -965,12 +965,6 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The number of iterations for the operation. property to display the number of iterations used in the generation of the key. This code example is part of a larger example provided for the class. From 148fbcf05daef095f9572b8ddd2a7e7254c3409f Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Mon, 1 Jun 2026 17:33:48 -0700 Subject: [PATCH 2/2] Also update the VB sample --- .../Rfc2898DeriveBytes/Overview/rfc28981.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/visualbasic/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.vb b/snippets/visualbasic/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.vb index 999cab698cb..11aed94cb1a 100644 --- a/snippets/visualbasic/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.vb +++ b/snippets/visualbasic/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/rfc28981.vb @@ -28,7 +28,7 @@ Public Class rfc2898test 'data1 can be a string or contents of a file. Dim data1 As String = "Some test data" ' - 'The default iteration count is 1000 so the two methods use the same iteration count. + 'The legacy default iteration count is 1000 so the two methods use the same iteration count. Dim myIterations As Integer = 1000 ' '