SignatureDescription Constructor (SecurityElement)

 

Initializes a new instance of the SignatureDescription class from the specified SecurityElement.

Namespace:   System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

public SignatureDescription(
	SecurityElement el
)

Parameters

el
Type: System.Security.SecurityElement

The SecurityElement from which to get the algorithms for the signature description.

Exception Condition
ArgumentNullException

The el parameter is null.

The following code example demonstrates how to initialize a new SignatureDescription class using a

SecurityElement containing the four algorithms. This code example is part of a larger example provided for the SignatureDescription class.

SecurityElement securityElement = new SecurityElement("DSASignature");

// Create new security elements for the four algorithms.
securityElement.AddChild(new SecurityElement(
    "Key",
    "System.Security.Cryptography.DSACryptoServiceProvider"));
securityElement.AddChild(new SecurityElement(
    "Digest",
    "System.Security.Cryptography.SHA1CryptoServiceProvider")); 
securityElement.AddChild(new SecurityElement(
    "Formatter",
    "System.Security.Cryptography.DSASignatureFormatter"));
securityElement.AddChild(new SecurityElement(
    "Deformatter",
    "System.Security.Cryptography.DSASignatureDeformatter"));

SignatureDescription signatureDescription = 
    new SignatureDescription(securityElement);

.NET Framework
Available since 1.1
Return to top
Show: