Class AesGcmXmlDataEncryptionExtension
Supports the AES-GCM XML data encryption algorithms.
Inherited Members
Namespace: ComponentSpace.Saml2.XmlSecurity.Encryption
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AesGcmXmlDataEncryptionExtension : IXmlDataEncryptionExtension, IXmlEncryptionExtension
  Remarks
The supported data encryption algorithms are:
- http://www.w3.org/2009/xmlenc11#aes128-gcm
 - http://www.w3.org/2009/xmlenc11#aes192-gcm
 - http://www.w3.org/2009/xmlenc11#aes256-gcm
 
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 | 
  |