Show / Hide Table of Contents

Class AesXmlDataEncryptionExtension

Supports the AES XML data encryption algorithms.

Inheritance
object
AesXmlDataEncryptionExtension
Implements
IXmlDataEncryptionExtension
IXmlEncryptionExtension
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ComponentSpace.Saml2.XmlSecurity.Encryption
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AesXmlDataEncryptionExtension : IXmlDataEncryptionExtension, IXmlEncryptionExtension
Remarks

The supported data encryption algorithms are:

  • http://www.w3.org/2001/04/xmlenc#aes128-cbc
  • http://www.w3.org/2001/04/xmlenc#kw-aes128
  • http://www.w3.org/2001/04/xmlenc#aes192-cbc
  • http://www.w3.org/2001/04/xmlenc#kw-aes192
  • http://www.w3.org/2001/04/xmlenc#aes256-cbc
  • http://www.w3.org/2001/04/xmlenc#kw-aes256

Methods

CreateSymmetricKey(string)

Creates a random symmetric key.

Declaration
public byte[] CreateSymmetricKey(string dataEncryptionAlgorithm)
Parameters
Type Name Description
string dataEncryptionAlgorithm

The data encryption algorithm.

Returns
Type Description
byte[]

The symmetric key.

DecryptData(EncryptedData, byte[], string)

Decrypts the data.

Declaration
public byte[] DecryptData(EncryptedData encryptedData, byte[] symmetricKey, string dataEncryptionAlgorithm)
Parameters
Type Name Description
EncryptedData encryptedData

The encrypted data.

byte[] symmetricKey

The decryption key.

string dataEncryptionAlgorithm

The data encryption algorithm.

Returns
Type Description
byte[]

The decrypted data.

EncryptData(byte[], byte[], string)

Encrypts the data.

Declaration
public byte[] EncryptData(byte[] plainText, byte[] symmetricKey, string dataEncryptionAlgorithm)
Parameters
Type Name Description
byte[] plainText

The data.

byte[] symmetricKey

The encryption key.

string dataEncryptionAlgorithm

The data encryption algorithm.

Returns
Type Description
byte[]

The encrypted data.

IsSupported(string)

Indicates whether the encryption algorithm is supported by this extension.

Declaration
public bool IsSupported(string encryptionAlgorithm)
Parameters
Type Name Description
string encryptionAlgorithm

The encryption algorithm.

Returns
Type Description
bool

true if the encryption algorithm is supported; otherwise false.

Implements

IXmlDataEncryptionExtension
IXmlEncryptionExtension
In this article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2025. All rights reserved.