Generates a combined-entropy key.
命名空间: Microsoft.IdentityModel
程序集: Microsoft.IdentityModel(microsoft.identitymodel.dll 中)
用法
Dim keySizeInBits As Integer Dim senderEntropy As Byte() Dim receiverEntropy As Byte() Dim returnValue As Byte() returnValue = KeyGenerator.GenerateSymmetricKey(keySizeInBits, senderEntropy, receiverEntropy)
语法
声明
Public Shared Function GenerateSymmetricKey ( _
keySizeInBits As Integer, _
senderEntropy As Byte(), _
<OutAttribute> ByRef receiverEntropy As Byte() _
) As Byte()
public static byte[] GenerateSymmetricKey (
int keySizeInBits,
byte[] senderEntropy,
out byte[] receiverEntropy
)
public:
static array<unsigned char>^ GenerateSymmetricKey (
int keySizeInBits,
array<unsigned char>^ senderEntropy,
[OutAttribute] array<unsigned char>^% receiverEntropy
)
public static byte[] GenerateSymmetricKey (
int keySizeInBits,
byte[] senderEntropy,
/** @attribute OutAttribute() */ /** @ref */ byte[] receiverEntropy
)
参数
- keySizeInBits
The key size in bits.
- senderEntropy
Requestor's entropy.
- receiverEntropy
The issuer's entropy.
返回值
The computed symmetric key based on PSHA1 algorithm.
异常
| 异常类型 | 条件 |
|---|
备注
This function should not be used to generate DES keys because it does not perform an IsWeakKey check. Use GenerateDESKey() instead.
线程安全
此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不能保证任何实例成员是线程安全的。
平台
开发平台
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP