Share via


Entropy Constructor (Int32)

Initializes a new instance of the Entropy class with a randomly generated entropy value of the specified size.

Namespace: Microsoft.Web.Services2.Security
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim sizeInBytes As Integer
Dim entropy1 As New Entropy(sizeInBytes)

Syntax

'Declaration
Public Sub New( _
    ByVal sizeInBytes As Integer _
)
public Entropy(
    int sizeInBytes
);
public: Entropy(
    Int32 sizeInBytes
);
public Entropy(
    int sizeInBytes
);
public function Entropy(
     sizeInBytes : int
);

Parameters

  • sizeInBytes
    The size of the randomly generated entropy value, in bytes.

Exceptions

Exception type Condition
System.ArgumentOutOfRangeException

sizeInBytes is less than or equal to zero.

Remarks

This constructor sets the value of the BinarySecret property to a BinarySecret that contains the randomly generated entropy value.

When the Entropy class is serialized into XML, the entropy value is placed in a <BinarySecret> child element, but the value is not encrypted.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

Entropy Class
Microsoft.Web.Services2.Security Namespace
BinarySecret
BinarySecret

Other Resources

Entropy Members