You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<paramname="disposing"><seelangword="true" /> to release both managed and unmanaged resources; <seelangword="false" /> to release only unmanaged resources.</param>
289
+
<summary>Releases the unmanaged resources used by the <seecref="T:System.Security.Cryptography.RNGCryptoServiceProvider" /> and optionally releases the managed resources.</summary>
290
290
<remarks>To be added.</remarks>
291
291
</Docs>
292
292
</Member>
@@ -315,7 +315,7 @@
315
315
</ReturnValue>
316
316
<Parameters />
317
317
<Docs>
318
-
<summary>To be added.</summary>
318
+
<summary>Frees resources used by the <seecref="T:System.Security.Cryptography.RNGCryptoServiceProvider"/> class.</summary>
<paramname="data">The array to fill with cryptographically strong random bytes.</param>
444
+
<paramname="offset">The index of the array to start the fill operation.</param>
445
+
<paramname="count">The number of bytes to fill.</param>
446
+
<summary>Fills the specified byte array with a cryptographically strong random sequence of values starting at a specified index for a specified number of bytes.</summary>
447
447
<remarks>To be added.</remarks>
448
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="data" /> is <seelangword="null" />.</exception>
449
+
<exceptioncref="T:System.ArgumentOutOfRangeException"><paramrefname="offset" /> or <paramrefname="count" /> is less than 0.</exception>
450
+
<exceptioncref="T:System.ArgumentException"><paramrefname="offset" /> plus <paramrefname="count" /> exceeds the length of <paramrefname="data" />.</exception>
<paramname="toExclusive">The exclusive upper bound of the random range.</param>
518
+
<summary>Generates a random integer between 0 (inclusive) and a specified exclusive upper bound using a cryptographically strong random number generator.</summary>
519
+
<returns>A random integer between 0 (inclusive) and <paramrefname="toExclusive"/> (exclusive).</returns>
520
+
<remarks>
521
+
<formattype="text/markdown"><![CDATA[
522
+
523
+
## Remarks
524
+
525
+
The upper bound is exclusive to enable passing in a length value from an array, span, or list.
526
+
Because it is an exclusive upper bound this method can never generate <xref:System.Int32.MaxValue?displayProperty=nameWithType>.
527
+
528
+
This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce.
529
+
530
+
]]></format>
531
+
</remarks>
532
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The <paramrefname="toExclusive"/> parameter is less than or equal to 0.</exception>
519
533
</Docs>
520
534
</Member>
521
535
<MemberMemberName="GetInt32">
@@ -545,11 +559,25 @@ To create a random number generator, call the @System.Security.Cryptography.Rand
<paramname="fromInclusive">The inclusive lower bound of the random range.</param>
563
+
<paramname="toExclusive">The exclusive upper bound of the random range.</param>
564
+
<summary>Generates a random integer between a specified inclusive lower bound and a specified exclusive upper bound using a cryptographically strong random number generator.</summary>
565
+
<returns>A random integer between <paramrefname="fromInclusive"/> (inclusive) and <paramrefname="toExclusive"/> (exclusive).</returns>
566
+
<remarks>
567
+
<formattype="text/markdown"><![CDATA[
568
+
569
+
## Remarks
570
+
571
+
The upper bound is exclusive to enable passing in a length value from an array, span, or list.
572
+
Because it is an exclusive upper bound this method can never generate <xref:System.Int32.MaxValue?displayProperty=nameWithType>.
573
+
574
+
This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce.
575
+
576
+
Negative values are permitted for both `fromInclusive` and `toExclusive`.
577
+
578
+
]]></format>
579
+
</remarks>
580
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The <paramrefname="toExclusive"/> parameter is less than or equal to the <paramrefname="fromInclusive"/> parameter.</exception>
553
581
</Docs>
554
582
</Member>
555
583
<MemberMemberName="GetNonZeroBytes">
@@ -632,10 +660,10 @@ To create a random number generator, call the @System.Security.Cryptography.Rand
0 commit comments