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

属性值

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 对象包含大量属性,这些属性指定要在特定条件下使用的安全算法。 它还描述该服务的各种安全功能。

适用于