Class SecureXmlObfuscator
Provides methods for secure obfuscation (based on AES) of the otherwise similar class XmlObfuscator.
Inherited Members
Namespace: Cuemon.Security
Assembly: Cuemon.Xml.dll
Syntax
public sealed class SecureXmlObfuscator : XmlObfuscator
Remarks
Logic used from the AdvancedEncryptionStandardUtility class.
Constructors
| Improve this DocSecureXmlObfuscator(Byte[], Byte[])
Initializes a new instance of the SecureXmlObfuscator class using System.Text.Encoding.UTF8 for the text encoding.
Declaration
public SecureXmlObfuscator(byte[] key, byte[] initializationVector)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | key | The key to use in the encryption algorithm. |
System.Byte[] | initializationVector | The initialization vector (IV) to use in the encryption algorithm. |
SecureXmlObfuscator(Byte[], Byte[], IEnumerable<String>)
Initializes a new instance of the SecureXmlObfuscator class.
Declaration
public SecureXmlObfuscator(byte[] key, byte[] initializationVector, IEnumerable<string> exclusions)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | key | The key to use in the encryption algorithm. |
System.Byte[] | initializationVector | The initialization vector (IV) to use in the encryption algorithm. |
System.Collections.Generic.IEnumerable<System.String> | exclusions | A sequence of System.String values used for excluding matching original values in the obfuscation process. |
SecureXmlObfuscator(Byte[], Byte[], Encoding)
Initializes a new instance of the SecureXmlObfuscator class using System.Text.Encoding.UTF8 for the text encoding.
Declaration
public SecureXmlObfuscator(byte[] key, byte[] initializationVector, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | key | The key to use in the encryption algorithm. |
System.Byte[] | initializationVector | The initialization vector (IV) to use in the encryption algorithm. |
System.Text.Encoding | encoding | The text encoding to use. |
SecureXmlObfuscator(Byte[], Byte[], Encoding, IEnumerable<String>)
Initializes a new instance of the SecureXmlObfuscator class.
Declaration
public SecureXmlObfuscator(byte[] key, byte[] initializationVector, Encoding encoding, IEnumerable<string> exclusions)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | key | The key to use in the encryption algorithm. |
System.Byte[] | initializationVector | The initialization vector (IV) to use in the encryption algorithm. |
System.Text.Encoding | encoding | The character encoding to use. |
System.Collections.Generic.IEnumerable<System.String> | exclusions | A sequence of System.String values used for excluding matching original values in the obfuscation process. |
Properties
| Improve this DocInitializationVector
Gets the initialization vector (IV) for the AES algorithm.
Declaration
public byte[] InitializationVector { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Key
Gets the secret key for the AES algorithm.
Declaration
public byte[] Key { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
| Improve this DocCreateMapping()
Creates and returns a mappable XML document of the original values and the obfuscated values.
Declaration
public override Stream CreateMapping()
Returns
Type | Description |
---|---|
System.IO.Stream | A mappable XML document of the original values and the obfuscated values. |
Overrides
| Improve this DocRevert(Stream, Stream)
Revert the obfuscated XML document of value
to its original state by applying the mappable XML document of mapping
.
Declaration
public override Stream Revert(Stream value, Stream mapping)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The obfuscated System.IO.Stream to revert. |
System.IO.Stream | mapping | A System.IO.Stream containing mappable values necessary to revert |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream object where the obfuscated XML document has been reverted to its original XML document. |