Entropy Constructor (Int32, SecurityToken)
Initializes a new instance of the Entropy class with a randomly generated entropy value of the specified size that is encrypted using the specified security token.
Namespace: Microsoft.Web.Services3.Security
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Usage
'Usage
Dim sizeInBytes As Integer
Dim encryptingToken As SecurityToken
Dim entropy1 As New Entropy(sizeInBytes, encryptingToken)
Syntax
'Declaration
Public Sub New( _
ByVal sizeInBytes As Integer, _
ByVal encryptingToken As SecurityToken _
)
public Entropy(
int sizeInBytes,
SecurityToken encryptingToken
);
public:
Entropy(
int sizeInBytes,
SecurityToken^ encryptingToken
);
public Entropy(
int sizeInBytes,
SecurityToken encryptingToken
);
public function Entropy(
sizeInBytes : int,
encryptingToken : SecurityToken
);
Parameters
- sizeInBytes
The size of the randomly generated entropy value, in bytes.
- encryptingToken
The SecurityToken that is used to encrypt the entropy value.
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | sizeInBytes is less than or equal to zero. |
ArgumentNullException | encryptingToken is null. |
Remarks
This constructor sets the value of the EncryptedKey property to an EncryptedKey that contains the randomly generated entropy value. When the Entropy class is serialized into XML, the entropy value is encrypted using the security token specified in the encryptingToken parameter and placed in an <EncryptedKey> child element. Typically, the encryptingToken parameter is the public key of the security token service, so that only the security token service can decrypt the entropy value.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server
Target Platforms
See Also
Reference
Entropy Class
Entropy Members
Microsoft.Web.Services3.Security Namespace
EncryptedKey
EncryptedKey