Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

KeyInfo Class

Represents an XML digital signature or XML encryption <KeyInfo> element.

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

public class KeyInfo implements IEnumerable

The KeyInfo class represents key information in XML digital signing and encryption.

The KeyInfo class enables you to imbed key-related information intended to help identify the key necessary for validating or decrypting the XML document. Multiple types of key-related information can be included within a single KeyInfo; each type of key-related information has an associated class derived from KeyInfoClause.

For more information about the <KeyInfo> element, see the XMLDSIG specification, which is available from the W3C at www.w3.org/TR/xmldsig-core/, or see the XML encryption specification, which is available from the W3C at www.w3.org/TR/xmlenc-core/.

The following code example uses the KeyInfo object when signing a resource represented by a Universal Resource Identifier (URI). This example saves the signature in a new file.

No code example is currently available or this language may not be supported.

The following code example uses the KeyInfo object when signing an XML document. This example saves the signature in a new file.

No code example is currently available or this language may not be supported.

The following code example uses the KeyInfo object when encrypting an XML document. This example embeds an encrypted key within the encrypted XML document.

No code example is currently available or this language may not be supported.

The following code example uses the KeyInfo object when encrypting an XML document. This example maps a name to a symmetric key to identify it to the decryption method.

No code example is currently available or this language may not be supported.

System.Object
  System.Security.Cryptography.Xml.KeyInfo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft