AsymmetricSecurityBindingElement.SetKeyDerivation(Boolean) 方法

定义

设置一个值,该值指示是否需要派生密钥。

public:
 override void SetKeyDerivation(bool requireDerivedKeys);
public override void SetKeyDerivation (bool requireDerivedKeys);
override this.SetKeyDerivation : bool -> unit
Public Overrides Sub SetKeyDerivation (requireDerivedKeys As Boolean)

参数

requireDerivedKeys
Boolean

如果需要派生密钥,则为 true;否则为 false

示例

下面的代码演示如何设置此属性。

AsymmetricSecurityBindingElement abe =
    (AsymmetricSecurityBindingElement)SecurityBindingElement.
    CreateMutualCertificateBindingElement(
    MessageSecurityVersion.
    WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10);

abe.SetKeyDerivation(false);
Dim abe As AsymmetricSecurityBindingElement = CType(SecurityBindingElement.CreateMutualCertificateBindingElement(MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10), AsymmetricSecurityBindingElement)

abe.SetKeyDerivation(False)

注解

派生密钥是从现有密钥创建而来。使用它就可以在对话过程中使用不同的密钥。 这会增加黑客解密通信的难度。

适用于