SecurityBindingElement::DefaultAlgorithmSuite Property

 

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

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

public:
property SecurityAlgorithmSuite^ DefaultAlgorithmSuite {
	SecurityAlgorithmSuite^ get();
	void set(SecurityAlgorithmSuite^ value);
}

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: