Class AesXmlDataEncryptionExtension
Supports the AES XML data encryption algorithms.
Inheritance
System.Object
AesXmlDataEncryptionExtension
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ComponentSpace.Saml2.XmlSecurity.Encryption
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AesXmlDataEncryptionExtension : IXmlDataEncryptionExtension, IXmlEncryptionExtension
Remarks
The supported data encryption algorithms are:
Methods
CreateSymmetricKey(String)
Creates a random symmetric key.
Declaration
public byte[] CreateSymmetricKey(string dataEncryptionAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataEncryptionAlgorithm | The data encryption algorithm. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.Security.Cryptography.Xml.EncryptedData | encryptedData | The encrypted data. |
System.Byte[] | symmetricKey | The decryption key. |
System.String | dataEncryptionAlgorithm | The data encryption algorithm. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.Byte[] | plainText | The data. |
System.Byte[] | symmetricKey | The encryption key. |
System.String | dataEncryptionAlgorithm | The data encryption algorithm. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | encryptionAlgorithm | The encryption algorithm. |
Returns
Type | Description |
---|---|
System.Boolean |
|