Class HashingObfuscationEngine
Obfuscation engine that hashes PII using salt.
Implements
Inherited Members
Namespace: Microsoft.Graph.Communications.Common.Telemetry.Obfuscation
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class HashingObfuscationEngine : IObfuscationEngine
Constructors
HashingObfuscationEngine(Func<Byte[]>)
Initializes a new instance of the HashingObfuscationEngine class.
Declaration
public HashingObfuscationEngine(Func<byte[]> saltProvider)
Parameters
Type | Name | Description |
---|---|---|
Func<Byte[]> | saltProvider | The salt provider. |
Properties
Enabled
Gets a value indicating whether obfuscation is enabled.
Declaration
public bool Enabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
HashAlgorithm
Gets or sets the hash algorithm.
Declaration
public HashAlgorithm HashAlgorithm { get; set; }
Property Value
Type | Description |
---|---|
HashAlgorithm |
HashLength
Gets or sets the length of the hashed payload. Set this to -1 for full salt.
Declaration
public int HashLength { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
ObfuscationConfiguration
Gets or sets the obfuscation configuration. This is also set when configuration is linked to an obfuscation engine.
Declaration
public ObfuscationConfiguration ObfuscationConfiguration { get; set; }
Property Value
Type | Description |
---|---|
ObfuscationConfiguration |
SaltProvider
Gets or sets the salt provider.
Declaration
protected Func<byte[]> SaltProvider { get; set; }
Property Value
Type | Description |
---|---|
Func<Byte[]> |
Methods
Obfuscate(Object, ObfuscationTag)
Obfuscates the specified payload.
Declaration
public string Obfuscate(object payload, ObfuscationTag obfuscationTag)
Parameters
Type | Name | Description |
---|---|---|
Object | payload | The payload. |
ObfuscationTag | obfuscationTag | The obfuscation tag. |
Returns
Type | Description |
---|---|
String | Obfuscated data. |