Net.Bluewalk.DotNetUtils/Extensions/ObjectExtensions.cs
/// <summary>
/// Generates keyed hash, similar to GetHash only it uses a key to generate hash
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="instance"></param>
/// <param name="key"></param>
/// <returns></returns>
Generates keyed hash, similar to GetHash only it uses a key to generate hash
Generates keyed hash similar to GetHash only it uses a key to generate hash
public static string GetKeyedHash<T>(this object instance, byte[] key) where T : KeyedHashAlgorithm, new()
        {
            var cryptoServiceProvider = new T {Key = key};
            return ComputeHash(instance, cryptoServiceProvider);
        }
public static string GetKeyedHash < T > ( this object instance , byte [ ] key ) where T : KeyedHashAlgorithm , new ( ) { var cryptoServiceProvider = new T { Key = key } ; return ComputeHash ( instance , cryptoServiceProvider ) ; }
Generates keyed hash, similar to GetHash only it uses a key to generate hash
Generates keyed hash similar to GetHash only it uses a key to generate hash
None
object
this
key
byte[]
None
instance
None
typeparam
None