SecurityBindingElement.DefaultAlgorithmSuite Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the message encryption and key-wrap algorithms.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public SecurityAlgorithmSuite DefaultAlgorithmSuite { get; set; }

Property Value

Type: System.ServiceModel.Security.SecurityAlgorithmSuite

The SecurityAlgorithmSuite object that represents the message encryption and key-wrap algorithms.

Exception Condition
ArgumentNullException

The value is null on a set.

The SecurityAlgorithmSuite object that contains numerous properties that specify security algorithms that are to be used for signing, encryption, key derivation, and other cryptographic operations. It also controls the key sizes that are used for doing these cryptographic operations.

The following code shows how to set this property.

SymmetricSecurityBindingElement b =
    SecurityBindingElement.
    CreateAnonymousForCertificateBindingElement();

BindingElementCollection outputBindings = 
    new BindingElementCollection();

b.DefaultAlgorithmSuite = SecurityAlgorithmSuite.Basic128;
b.MessageProtectionOrder = 
    MessageProtectionOrder.SignBeforeEncrypt;
b.ProtectionTokenParameters = 
    new KerberosSecurityTokenParameters();

.NET Framework
Available since 3.0
Return to top
Show: