Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if (!_IsDisposed)
     {
         _IsDisposed = true;
         _Hasher.Dispose();
     }
 }
Esempio n. 3
0
        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);
        }