From 55762c007298131dd921f18df018226dac26336f Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 25 Apr 2025 07:02:00 -0700 Subject: [PATCH 1/2] clarify key length parameter --- .../Rfc2898DeriveBytes.xml | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml index 3e89eeceacf..e3c5a00b62b 100644 --- a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml +++ b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml @@ -1039,7 +1039,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive. + The size of key to derive (that is, the number of elements in the byte array). Creates a PBKDF2 derived key from password bytes. A byte array containing the created PBKDF2 derived key. To be added. @@ -1100,7 +1100,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive. + The size of key to derive (that is, the number of elements in the byte array). Creates a PBKDF2 derived key from password bytes. A byte array containing the created PBKDF2 derived key. To be added. @@ -1207,17 +1207,15 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive. + The size of key to derive (that is, the number of elements in the byte array). Creates a PBKDF2 derived key from a password. - A byte array of length that is filled with pseudo-random key bytes. + A byte array of length that's filled with pseudo-random key bytes. - and use . +The `password` is converted to bytes using the UTF8 encoding. For other encodings, convert the password string to bytes using the appropriate and use . ]]> @@ -1332,17 +1330,15 @@ The `password` will be converted to bytes using the UTF8 encoding. For The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive. + The size of key to derive (that is, the number of elements in the byte array). Creates a PBKDF2 derived key from a password. - A byte array of length that is filled with pseudo-random key bytes. + A byte array of length that's filled with pseudo-random key bytes. - and use . +The `password` is converted to bytes using the UTF8 encoding. For other encodings, convert the password string to bytes using the appropriate and use . ]]> From 7529ddac4f769a35a6a0c1ac6fc1745e1844bdf8 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:20:15 -0700 Subject: [PATCH 2/2] respond to feedback --- .../Rfc2898DeriveBytes.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml index e3c5a00b62b..60486010b50 100644 --- a/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml +++ b/xml/System.Security.Cryptography/Rfc2898DeriveBytes.xml @@ -1039,7 +1039,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive (that is, the number of elements in the byte array). + The size of the key to derive, in bytes. Creates a PBKDF2 derived key from password bytes. A byte array containing the created PBKDF2 derived key. To be added. @@ -1100,7 +1100,7 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive (that is, the number of elements in the byte array). + The size of the key to derive, in bytes. Creates a PBKDF2 derived key from password bytes. A byte array containing the created PBKDF2 derived key. To be added. @@ -1207,9 +1207,9 @@ For more information about PBKDF2, see [RFC 2898](https://www.rfc-editor.org/inf The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive (that is, the number of elements in the byte array). + The size of the key to derive, in bytes. Creates a PBKDF2 derived key from a password. - A byte array of length that's filled with pseudo-random key bytes. + A byte array of length that is filled with pseudo-random key bytes. The key salt used to derive the key. The number of iterations for the operation. The hash algorithm to use to derive the key. - The size of key to derive (that is, the number of elements in the byte array). + The size of the key to derive, in bytes. Creates a PBKDF2 derived key from a password. - A byte array of length that's filled with pseudo-random key bytes. + A byte array of length that is filled with pseudo-random key bytes.