Show / Hide Table of Contents

    Class HashingObfuscationEngine

    Obfuscation engine that hashes PII using salt.

    Inheritance
    Object
    HashingObfuscationEngine
    Implements
    IObfuscationEngine
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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.

    Implements

    IObfuscationEngine

    Extension Methods

    AdditionalDataExtensions.SetInAdditionalData(Object, String, Object)
    Extensions.Pin(Object)
    Extensions.ChangeType(Object, Type)
    Extensions.ChangeType<T>(Object)
    Extensions.TryDispose(Object, IGraphLogger)
    ReflectionUtils.GetPropertyUsingReflection(Object, String)
    ReflectionUtils.SetPropertyUsingReflection(Object, String, Object)
    Validator.IsNull(Object, String, String)
    Validator.NotNull<T>(T, String, String)
    Validator.Equals<T>(T, T, String, String)
    Validator.Equals<T, TE>(T, T, String)
    Validator.NotEquals<T>(T, T, String, String)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.