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.GenerateSymmetricKey(keySizeInBits, senderEntropy, receiverEntropy) |
Syntax
Visual Basic |
---|
Public Shared Function GenerateSymmetricKey ( _ keySizeInBits As Integer, _ senderEntropy As Byte(), _ <OutAttribute> ByRef receiverEntropy As Byte() _ ) As Byte() |
C# |
---|
public static byte[] GenerateSymmetricKey ( int keySizeInBits, byte[] senderEntropy, out byte[] receiverEntropy ) |
C++ |
---|
public: static array<unsigned char>^ GenerateSymmetricKey ( int keySizeInBits, array<unsigned char>^ senderEntropy, [OutAttribute] array<unsigned char>^% receiverEntropy ) |
J# |
---|
public static byte[] GenerateSymmetricKey ( int keySizeInBits, byte[] senderEntropy, /** @attribute OutAttribute() */ /** @ref */ byte[] receiverEntropy ) |
JScript |
---|
|
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
Exception type | Condition |
---|
Remarks
This function should not be used to generate DES keys because it does not perform an IsWeakKey check. Use GenerateDESKey() instead.
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.