Class TripleDesXmlDataEncryptionExtension
Supports the triple DES XML data encryption algorithms.
Inherited Members
Namespace: ComponentSpace.Saml2.XmlSecurity.Encryption
Assembly: ComponentSpace.Saml2.dll
Syntax
public class TripleDesXmlDataEncryptionExtension : IXmlDataEncryptionExtension, IXmlEncryptionExtension
Remarks
The supported data encryption algorithms are:
- http://www.w3.org/2001/04/xmlenc#tripledes-cbc
- http://www.w3.org/2001/04/xmlenc#kw-tripledes
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 |
|