"

CryptoServiceProvider Class

Summary

A cryptographically secure random number generator wrapping RNGCryptoServiceProvider.
Namespace
RandN.Rngs
Interfaces
Base Types
  • object

Syntax

[Obsolete("This type is obsolete. Use SystemCryptoRng instead.")]
public sealed class CryptoServiceProvider : ICryptoRng, IRng, IDisposable

Remarks

Obsolete, and will be removed in a future version of RandN. This is due to CryptoServiceProvider becoming obsolete. See https://github.com/dotnet/runtime/issues/40169 for more details.

Attributes

TypeDescription
ObsoleteAttribute

Methods

NameValueSummary
Create()CryptoServiceProvider
Creates a new instance of CryptoServiceProvider.
static
Dispose()void
Fill(Span<byte>)void
Completely fills the span with random bytes.
GetFactory()CryptoServiceProvider.Factory
Returns a singleton instance of CryptoServiceProvider.Factory.
static
NextUInt32()uint
Returns the next 32 bits in the sequence as a UInt32.
NextUInt64()ulong
Returns the next 64 bits in the sequence as a UInt64.