Skip to content

Commit f2edeb8

Browse files
carlossanlopmairaw
authored andcommitted
Automatically port System.Security triple slash comments (#2673)
* Automatically port System.Security triple slash comments * bartonjs suggestion Co-Authored-By: Jeremy Barton <[email protected]> * suggestions by mairaw Co-Authored-By: Maira Wenzel <[email protected]> * Addressed remarks suggestions by mairaw. * Fixed malformed XML * remove remarks section for fields * Remove remarks sections for fields
1 parent 49f6f10 commit f2edeb8

File tree

9 files changed

+83
-52
lines changed

9 files changed

+83
-52
lines changed

xml/System.Security.Cryptography/CryptographicOperations.xml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,23 @@
4646
<Parameter Name="right" Type="System.ReadOnlySpan&lt;System.Byte&gt;" />
4747
</Parameters>
4848
<Docs>
49-
<param name="left">To be added.</param>
50-
<param name="right">To be added.</param>
51-
<summary>To be added.</summary>
52-
<returns>To be added.</returns>
53-
<remarks>To be added.</remarks>
49+
<param name="left">The first buffer to compare.</param>
50+
<param name="right">The second buffer to compare.</param>
51+
<summary>Determines the equality of two byte sequences in an amount of time that depends on the length of the sequences, but not their values.</summary>
52+
<returns><see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> have the same values for <see cref="P:System.ReadOnlySpan`1.Length" /> and the same contents; otherwise, <see langword="false" />.</returns>
53+
<remarks>
54+
<format type="text/markdown"><![CDATA[
55+
56+
## Remarks
57+
58+
This method compares the contents from two buffers for equality in a way that doesn't leak timing information, making it ideal for use within cryptographic routines.
59+
60+
This method will short-circuit and return `false` only if `left` and `right` have different lengths.
61+
62+
Fixed-time behavior is guaranteed in all other cases, including when `left` and `right` reference the same address.
63+
64+
]]></format>
65+
</remarks>
5466
</Docs>
5567
</Member>
5668
<Member MemberName="ZeroMemory">
@@ -82,4 +94,4 @@
8294
</Docs>
8395
</Member>
8496
</Members>
85-
</Type>
97+
</Type>

xml/System.Security.Cryptography/ECDiffieHellman.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@
305305
306306
]]></format>
307307
</remarks>
308+
<exception cref="T:System.ArgumentException"><paramref name="otherPartyPublicKey" /> is over a different curve than this key.</exception>
308309
</Docs>
309310
</Member>
310311
<Member MemberName="DeriveKeyFromHash">
@@ -345,6 +346,7 @@
345346
<returns>The key material from the key exchange with the other party's public key.</returns>
346347
<remarks>To be added.</remarks>
347348
<exception cref="T:System.NotImplementedException">A derived class must override this method.</exception>
349+
<exception cref="T:System.ArgumentException"><paramref name="otherPartyPublicKey" /> is over a different curve than this key.</exception>
348350
</Docs>
349351
</Member>
350352
<MemberGroup MemberName="DeriveKeyFromHmac">
@@ -398,6 +400,7 @@
398400
399401
]]></format>
400402
</remarks>
403+
<exception cref="T:System.ArgumentException"><paramref name="otherPartyPublicKey" /> is over a different curve than this key.</exception>
401404
</Docs>
402405
</Member>
403406
<Member MemberName="DeriveKeyFromHmac">
@@ -440,6 +443,7 @@
440443
<returns>The key material from the key exchange with the other party's public key.</returns>
441444
<remarks>To be added.</remarks>
442445
<exception cref="T:System.NotImplementedException">A derived class must override this method.</exception>
446+
<exception cref="T:System.ArgumentException"><paramref name="otherPartyPublicKey" /> is over a different curve than this key.</exception>
443447
</Docs>
444448
</Member>
445449
<Member MemberName="DeriveKeyMaterial">
@@ -519,6 +523,9 @@
519523
<returns>The key material from the key exchange with the other party's public key.</returns>
520524
<remarks>To be added.</remarks>
521525
<exception cref="T:System.NotImplementedException">A derived class must override this method.</exception>
526+
<exception cref="T:System.ArgumentException"><paramref name="otherPartyPublicKey" /> is over a different curve than this key.</exception>
527+
<exception cref="T:System.ArgumentNullException"><paramref name="prfLabel" /> or <paramref name="prfSeed" /> is <see langword="null" />.</exception>
528+
<exception cref="T:System.Security.Cryptography.CryptographicException"><paramref name="prfSeed" /> is not exactly 64 bytes in length.</exception>
522529
</Docs>
523530
</Member>
524531
<Member MemberName="ExportECPrivateKey">
@@ -1221,4 +1228,4 @@
12211228
</Docs>
12221229
</Member>
12231230
</Members>
1224-
</Type>
1231+
</Type>

xml/System.Security.Cryptography/ECDsaCng.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@
235235
</remarks>
236236
<exception cref="T:System.Security.Cryptography.CryptographicException">
237237
<paramref name="curve" /> does not validate.</exception>
238+
<exception cref="T:System.ArgumentNullException"><paramref name="curve" /> is <see langword="null" />.</exception>
239+
<exception cref="T:System.PlatformNotSupportedException">if <paramref name="curve" /> does not contain an Oid with a FriendlyName.</exception>
238240
</Docs>
239241
</Member>
240242
<Member MemberName="Dispose">
@@ -1361,4 +1363,4 @@
13611363
</Docs>
13621364
</Member>
13631365
</Members>
1364-
</Type>
1366+
</Type>

xml/System.Security.Cryptography/RSACng.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@
758758
<param name="destination">To be added.</param>
759759
<param name="padding">To be added.</param>
760760
<param name="bytesWritten">To be added.</param>
761-
<summary>To be added.</summary>
761+
<summary>Attempts to decrypt the specified data using the private key.</summary>
762762
<returns>To be added.</returns>
763763
<remarks>To be added.</remarks>
764764
</Docs>
@@ -792,7 +792,7 @@
792792
<param name="destination">To be added.</param>
793793
<param name="padding">To be added.</param>
794794
<param name="bytesWritten">To be added.</param>
795-
<summary>To be added.</summary>
795+
<summary>Attempts to encrypt the specified data using the public key.</summary>
796796
<returns>To be added.</returns>
797797
<remarks>To be added.</remarks>
798798
</Docs>
@@ -967,4 +967,4 @@
967967
</Docs>
968968
</Member>
969969
</Members>
970-
</Type>
970+
</Type>

xml/System.Security.Cryptography/RSACryptoServiceProvider.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,9 @@
626626
<Parameter Name="disposing" Type="System.Boolean" />
627627
</Parameters>
628628
<Docs>
629-
<param name="disposing">To be added.</param>
630-
<summary>To be added.</summary>
629+
<param name="disposing">
630+
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
631+
<summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> class and optionally releases the managed resources.</summary>
631632
<remarks>To be added.</remarks>
632633
</Docs>
633634
</Member>
@@ -2089,4 +2090,4 @@
20892090
</Docs>
20902091
</Member>
20912092
</Members>
2092-
</Type>
2093+
</Type>

xml/System.Security.Cryptography/RSAEncryptionPadding.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,18 @@
286286
<ReturnType>System.Security.Cryptography.HashAlgorithmName</ReturnType>
287287
</ReturnValue>
288288
<Docs>
289-
<summary>Gets the hash algorithm used in conjunction with the <see cref="F:System.Security.Cryptography.RSAEncryptionPaddingMode.Oaep" /> padding mode. If the value of the <see cref="P:System.Security.Cryptography.RSAEncryptionPadding.Mode" /> property is not <see cref="F:System.Security.Cryptography.RSAEncryptionPaddingMode.Oaep" />, <see cref="P:System.Security.Cryptography.HashAlgorithmName.Name" /> is <see langword="null" />.</summary>
289+
<summary>Gets the hash algorithm used in conjunction with the <see cref="F:System.Security.Cryptography.RSAEncryptionPaddingMode.Oaep" /> padding mode.</summary>
290290
<value>The hash algorithm.</value>
291-
<remarks>To be added.</remarks>
291+
<remarks>
292+
<format type="text/markdown">
293+
<![CDATA[
294+
295+
## Remarks
296+
297+
If the value of the <xref:System.Security.Cryptography.RSAEncryptionPadding.Mode> property is not <xref:System.Security.Cryptography.RSAEncryptionPaddingMode.Oaep>, then <xref:System.Security.Cryptography.HashAlgorithmName.Name> will be `null`.
298+
299+
]]></format>
300+
</remarks>
292301
</Docs>
293302
</Member>
294303
<Member MemberName="OaepSHA1">

xml/System.Security.Cryptography/RSAEncryptionPaddingMode.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ The `Oaep` mode corresponds to the RSAES-OEAP encryption scheme described in the
108108
</Docs>
109109
</Member>
110110
</Members>
111-
</Type>
111+
</Type>

xml/System.Security.Cryptography/RSASignaturePaddingMode.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@
110110
</Docs>
111111
</Member>
112112
</Members>
113-
</Type>
113+
</Type>

0 commit comments

Comments
 (0)