共用方式為


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)

備註

會從現有金鑰建立衍生金鑰,並使用它來變更在對話期間使用的金鑰。 這樣可讓駭客難以解密通訊內容。

適用於