Skip to content

Commit e097b8b

Browse files
authored
Fix documentation mistakes in MLKem and MLKemAlgorithm
1 parent 23c9717 commit e097b8b

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

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

+15-15
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public abstract class MLKem : IDisposable
5656
/// The specific ML-KEM algorithm for this key.
5757
/// </param>
5858
/// <exception cref="ArgumentNullException">
59-
/// <paramref name="algorithm" /> is <see langword="null" />
59+
/// <paramref name="algorithm" /> is <see langword="null" />.
6060
/// </exception>
6161
protected MLKem(MLKemAlgorithm algorithm)
6262
{
@@ -74,10 +74,10 @@ protected MLKem(MLKemAlgorithm algorithm)
7474
/// The generated key.
7575
/// </returns>
7676
/// <exception cref="ArgumentNullException">
77-
/// <paramref name="algorithm" /> is <see langword="null" />
77+
/// <paramref name="algorithm" /> is <see langword="null" />.
7878
/// </exception>
7979
/// <exception cref="CryptographicException">
80-
/// An error occured generating the ML-KEM key.
80+
/// An error occurred generating the ML-KEM key.
8181
/// </exception>
8282
/// <exception cref="PlatformNotSupportedException">
8383
/// The platform does not support ML-KEM. Callers can use the <see cref="IsSupported" /> property
@@ -326,7 +326,7 @@ public byte[] ExportPrivateSeed()
326326
/// <see cref="MLKemAlgorithm.PrivateSeedSizeInBytes" /> from <paramref name="algorithm" />.
327327
/// </exception>
328328
/// <exception cref="ArgumentNullException">
329-
/// <paramref name="algorithm" /> is <see langword="null" />
329+
/// <paramref name="algorithm" /> is <see langword="null" />.
330330
/// </exception>
331331
/// <exception cref="CryptographicException">
332332
/// An error occurred while importing the key.
@@ -357,9 +357,9 @@ public static MLKem ImportPrivateSeed(MLKemAlgorithm algorithm, ReadOnlySpan<byt
357357
/// <see cref="MLKemAlgorithm.PrivateSeedSizeInBytes" /> from <paramref name="algorithm" />.
358358
/// </exception>
359359
/// <exception cref="ArgumentNullException">
360-
/// <para><paramref name="algorithm" /> is <see langword="null" /></para>
360+
/// <para><paramref name="algorithm" /> is <see langword="null" />.</para>
361361
/// <para>-or-</para>
362-
/// <para><paramref name="source" /> is <see langword="null" /></para>
362+
/// <para><paramref name="source" /> is <see langword="null" />.</para>
363363
/// </exception>
364364
/// <exception cref="CryptographicException">
365365
/// An error occurred while importing the key.
@@ -385,7 +385,7 @@ public static MLKem ImportPrivateSeed(MLKemAlgorithm algorithm, byte[] source)
385385
/// <paramref name="source"/> has a length that is not valid for the ML-KEM algorithm.
386386
/// </exception>
387387
/// <exception cref="ArgumentNullException">
388-
/// <paramref name="algorithm" /> is <see langword="null" />
388+
/// <paramref name="algorithm" /> is <see langword="null" />.
389389
/// </exception>
390390
/// <exception cref="CryptographicException">
391391
/// An error occurred while importing the key.
@@ -415,9 +415,9 @@ public static MLKem ImportDecapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpa
415415
/// <paramref name="source"/> has a length that is not valid for the ML-KEM algorithm.
416416
/// </exception>
417417
/// <exception cref="ArgumentNullException">
418-
/// <para><paramref name="algorithm" /> is <see langword="null" /></para>
418+
/// <para><paramref name="algorithm" /> is <see langword="null" />.</para>
419419
/// <para>-or-</para>
420-
/// <para><paramref name="source" /> is <see langword="null" /></para>
420+
/// <para><paramref name="source" /> is <see langword="null" />.</para>
421421
/// </exception>
422422
/// <exception cref="CryptographicException">
423423
/// An error occurred while importing the key.
@@ -472,9 +472,9 @@ public static MLKem ImportEncapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpa
472472
/// <paramref name="source"/> has a length that is not valid for the ML-KEM algorithm.
473473
/// </exception>
474474
/// <exception cref="ArgumentNullException">
475-
/// <para><paramref name="algorithm" /> is <see langword="null" /></para>
475+
/// <para><paramref name="algorithm" /> is <see langword="null" />.</para>
476476
/// <para>-or-</para>
477-
/// <para><paramref name="source" /> is <see langword="null" /></para>
477+
/// <para><paramref name="source" /> is <see langword="null" />.</para>
478478
/// </exception>
479479
/// <exception cref="CryptographicException">
480480
/// An error occurred while importing the key.
@@ -707,7 +707,7 @@ public bool TryExportPkcs8PrivateKey(Span<byte> destination, out int bytesWritte
707707
/// Export the current key in the PKCS#8 PrivateKeyInfo format.
708708
/// </summary>
709709
/// <returns>
710-
/// A byte array containing the PKCS#8 PrivateKeyInfo representation of the this key.
710+
/// A byte array containing the PKCS#8 PrivateKeyInfo representation of this key.
711711
/// </returns>
712712
/// <exception cref="ObjectDisposedException">
713713
/// This instance has been disposed.
@@ -923,7 +923,7 @@ public bool TryExportEncryptedPkcs8PrivateKey(
923923
/// The password-based encryption (PBE) parameters to use when encrypting the key material.
924924
/// </param>
925925
/// <returns>
926-
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of the this key.
926+
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.
927927
/// </returns>
928928
/// <exception cref="ArgumentNullException">
929929
/// <paramref name="pbeParameters"/> is <see langword="null"/>.
@@ -963,7 +963,7 @@ public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, P
963963
/// The password-based encryption (PBE) parameters to use when encrypting the key material.
964964
/// </param>
965965
/// <returns>
966-
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of the this key.
966+
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.
967967
/// </returns>
968968
/// <exception cref="ArgumentNullException">
969969
/// <paramref name="pbeParameters"/> is <see langword="null"/>.
@@ -1003,7 +1003,7 @@ public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, PbePar
10031003
/// The password-based encryption (PBE) parameters to use when encrypting the key material.
10041004
/// </param>
10051005
/// <returns>
1006-
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of the this key.
1006+
/// A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.
10071007
/// </returns>
10081008
/// <exception cref="ArgumentNullException">
10091009
/// <paramref name="pbeParameters" /> or <paramref name="password" /> is <see langword="null" />.

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -63,44 +63,44 @@ private MLKemAlgorithm(
6363
public string Name { get; }
6464

6565
/// <summary>
66-
/// Gets size of the encapsulation key for the algorithm, in bytes.
66+
/// Gets the size of the encapsulation key for the algorithm, in bytes.
6767
/// </summary>
6868
/// <value>
69-
/// The size of the encapsulation key for the algorithm, in bytes.
69+
/// The size of the encapsulation key for the algorithm, in bytes.
7070
/// </value>
7171
public int EncapsulationKeySizeInBytes { get; }
7272

7373
/// <summary>
74-
/// Gets size of the decapsulation key for the algorithm, in bytes.
74+
/// Gets the size of the decapsulation key for the algorithm, in bytes.
7575
/// </summary>
7676
/// <value>
77-
/// The size of the decapsulation key for the algorithm, in bytes.
77+
/// The size of the decapsulation key for the algorithm, in bytes.
7878
/// </value>
7979
public int DecapsulationKeySizeInBytes { get; }
8080

8181
/// <summary>
82-
/// Gets size of the ciphertext for the algorithm, in bytes.
82+
/// Gets the size of the ciphertext for the algorithm, in bytes.
8383
/// </summary>
8484
/// <value>
85-
/// The size of the ciphertext for the algorithm, in bytes.
85+
/// The size of the ciphertext for the algorithm, in bytes.
8686
/// </value>
8787
public int CiphertextSizeInBytes { get; }
8888

8989
/// <summary>
90-
/// Gets size of the shared secret for the algorithm, in bytes.
90+
/// Gets the size of the shared secret for the algorithm, in bytes.
9191
/// </summary>
9292
/// <value>
93-
/// The size of the shared secret for the algorithm, in bytes.
93+
/// The size of the shared secret for the algorithm, in bytes.
9494
/// </value>
9595
// Right now every shared secret for ML-KEM is 32 bytes. If or when a different shared secret
9696
// size is needed, then it can be provided as input to the private constructor.
9797
public int SharedSecretSizeInBytes { get; } = 32;
9898

9999
/// <summary>
100-
/// Gets size of the private seed for the algorithm, in bytes.
100+
/// Gets the size of the private seed for the algorithm, in bytes.
101101
/// </summary>
102102
/// <value>
103-
/// The size of the private seed for the algorithm, in bytes.
103+
/// The size of the private seed for the algorithm, in bytes.
104104
/// </value>
105105
// Right now every seed for ML-KEM is 64 bytes. If or when a different seed
106106
// size is needed, then it can be provided as input to the private constructor.

0 commit comments

Comments
 (0)