共用方式為


FederatedMessageSecurityOverHttp.AlgorithmSuite 屬性

定義

取得或設定演算法套件,指定訊息加密和金鑰包裝演算法。

public:
 property System::ServiceModel::Security::SecurityAlgorithmSuite ^ AlgorithmSuite { System::ServiceModel::Security::SecurityAlgorithmSuite ^ get(); void set(System::ServiceModel::Security::SecurityAlgorithmSuite ^ value); };
public System.ServiceModel.Security.SecurityAlgorithmSuite AlgorithmSuite { get; set; }
member this.AlgorithmSuite : System.ServiceModel.Security.SecurityAlgorithmSuite with get, set
Public Property AlgorithmSuite As SecurityAlgorithmSuite

屬性值

指定訊息加密和金鑰包裝演算法的演算法套件。 預設為 Basic256

例外狀況

值為 null

範例

下列程式碼示範如何從繫結存取這個屬性並加以設定。

// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
    CreateWSFederationHttpBinding(bool isClient)
{
  // Create an instance of the WSFederationHttpBinding.
  WSFederationHttpBinding b = new WSFederationHttpBinding();

  // Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message;

  // Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
  ' Create an instance of the WSFederationHttpBinding.
  Dim b As New WSFederationHttpBinding()

  ' Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message

  ' Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15

備註

傳回的 SecurityAlgorithmSuite 物件含有許多可用來指定在特定情況下使用之安全性演算法的屬性。 它還會描述服務的各種安全性功能。

適用於