public static Guid GetGuid(byte[] key, byte[] value) { var algorithm = new System.Security.Cryptography.HMACSHA256(); var guid = HashHelper.GetGuid(algorithm, key, value); algorithm.Dispose(); return(guid); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (!_IsDisposed) { _IsDisposed = true; _Hasher.Dispose(); } }
public static Guid GetGuid(string key, long value) { var algorithm = new System.Security.Cryptography.HMACSHA256(); var guid = HashHelper.GetGuid(algorithm, key, BitConverter.GetBytes(value)); algorithm.Dispose(); return(guid); }