Generates a combined-entropy key for use
with the DES or Triple-DES algorithms. This function will always
return a key that is not considered weak by
TripleDES.IsWeakKey().
Namespace: Microsoft.IdentityModel
Assembly: Microsoft.IdentityModel (in
microsoft.identitymodel.dll)
Usage
Visual Basic |
Dim keySizeInBits As Integer
Dim senderEntropy As Byte()
Dim receiverEntropy As Byte()
Dim returnValue As Byte()
returnValue = KeyGenerator.GenerateDESKey(keySizeInBits, senderEntropy, receiverEntropy)
|
Syntax
Visual Basic |
Public Shared Function GenerateDESKey ( _
keySizeInBits As Integer, _
senderEntropy As Byte(), _
<OutAttribute> ByRef receiverEntropy As Byte() _
) As Byte()
|
C# |
public static byte[] GenerateDESKey (
int keySizeInBits,
byte[] senderEntropy,
out byte[] receiverEntropy
)
|
C++ |
public:
static array<unsigned char>^ GenerateDESKey (
int keySizeInBits,
array<unsigned char>^ senderEntropy,
[OutAttribute] array<unsigned char>^% receiverEntropy
)
|
J# |
public static byte[] GenerateDESKey (
int keySizeInBits,
byte[] senderEntropy,
/** @attribute OutAttribute() */ /** @ref */ byte[] receiverEntropy
)
|
Parameters
- keySizeInBits
-
The key size in bits.
- senderEntropy
-
Requestor's entropy.
- receiverEntropy
-
The issuer's entropy.
Return Value
The computed symmetric key based on PSHA1 algorithm.
Exceptions
Thread Safety
Any public static (Shared in Visual
Basic) members of this type are thread safe. Any instance members
are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
See Also