X509SecurityTokenManager.DefaultSessionKeyAlgorithm Property
Gets or sets the default session key algorithm for X509SecurityToken security tokens.
Namespace: Microsoft.Web.Services3.Security.Tokens
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Usage
'Usage
Dim x509SecurityTokenManager1 As X509SecurityTokenManager
Dim returnValue As String
returnValue = x509SecurityTokenManager1.DefaultSessionKeyAlgorithm
Dim sampleValue As String
x509SecurityTokenManager1.DefaultSessionKeyAlgorithm = sampleValue
Syntax
'Declaration
Public Overridable Property DefaultSessionKeyAlgorithm() As String
public virtual string DefaultSessionKeyAlgorithm {get; set;}
public:
property virtual String^ DefaultSessionKeyAlgorithm {
String^ get();
void set(String^ value);
}
virtual public System.String get_DefaultSessionKeyAlgorithm();
public void set_DefaultSessionKeyAlgorithm(System.String);
public function get DefaultSessionKeyAlgorithm() : String;
public function set DefaultSessionKeyAlgorithm(String);
Property Value
The default session key algorithm for X509SecurityToken security tokens.
Example
The following code example shows how to change the default session key algorithm for a X509SecurityToken security token to AES256.
Dim stm As ISecurityTokenManager = SecurityTokenManager.GetSecurityTokenManagerByTokenType(WSTrust.TokenTypes.X509v3)
stm.DefaultSessionKeyAlgorithm = "AES256"
Dim token As X509SecurityToken = New X509SecurityToken(x509Certificate)
ISecurityTokenManager stm = SecurityTokenManager.GetSecurityTokenManagerByTokenType(WSTrust.TokenTypes.X509v3);
stm.DefaultSessionKeyAlgorithm = "AES256";
X509SecurityToken token = new X509SecurityToken(x509Certificate);
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | The value for the default session key algorithm is not valid. |
Remarks
If not specified, the value for the default session key algorithm is AES128. Valid values for the default session key algorithm are AES128, AES192, AES256, TripleDES, RSA15, and RSAOAEP. RSAOAEP is not supported on versions of Windows that are earlier than Microsoft(r) Windows(r) XP.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server
Target Platforms
See Also
Reference
X509SecurityTokenManager Class
X509SecurityTokenManager Members
Microsoft.Web.Services3.Security.Tokens Namespace