RandomNumberGenerator

RandomNumberGenerator

System.Security.Cryptography (mscorlib.dll)abstract class
public abstract class RandomNumberGenerator { // Public Constructors    public RandomNumberGenerator(  ); // Public Static Methods    public static RandomNumberGenerator Create(  );    public static RandomNumberGenerator Create(string rngName); // Public Instance Methods    public abstract void GetBytes(byte[  ] data);    public abstract void GetNonZeroBytes(byte[  ] data); }

The RandomNumberGenerator class is the abstract base from which random number generator implementations inherit. Implementation classes are instantiated with the Create( ) method, which accepts the name of an implementation as a String argument. An instance of the default algorithm is created if no name is specified; the system administrator can configure the default algorithm.

The GetBytes( ) method populates a System.Byte array with random values; the array to fill is the sole argument to the method. The GetNonZeroBytes( ) method populates a System.Byte array with random values, none of which will be 0.

The .NET Framework class library includes the RNGCryptoServiceProvider class, which is the default implementation.

Subclasses

RNGCryptoServiceProvider

Returned By

RSAOAEPKeyExchangeFormatter.Rng, RSAPKCS1KeyExchangeDeformatter.RNG, RSAPKCS1KeyExchangeFormatter.Rng

Passed To

RSAOAEPKeyExchangeFormatter.Rng, RSAPKCS1KeyExchangeDeformatter.RNG, RSAPKCS1KeyExchangeFormatter.Rng



Programming. NET Security
Programming .Net Security
ISBN: 0596004427
EAN: 2147483647
Year: 2005
Pages: 346

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net