MaskGenerationMethod.GenerateMask(Byte[], Int32) Method

Definition

When overridden in a derived class, generates a mask with the specified length using the specified random seed.

C#
public abstract byte[] GenerateMask(byte[] rgbSeed, int cbReturn);
C#
[System.Runtime.InteropServices.ComVisible(true)]
public abstract byte[] GenerateMask(byte[] rgbSeed, int cbReturn);

Parameters

rgbSeed
Byte[]

The random seed to use to compute the mask.

cbReturn
Int32

The length of the generated mask in bytes.

Returns

Byte[]

A randomly generated mask whose length is equal to the cbReturn parameter.

Attributes

Examples

The following code example demonstrates how to override the GenerateMask to create and return a mask using the specified seed. This code example is part of a larger example provided for the MaskGenerationMethod class.

System.Security.Cryptography.MaskGenerationMethod#3

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1