コード例 #1
0
ファイル: SHA256Helper.cs プロジェクト: x360ce/x360ce
        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);
        }
コード例 #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();
     }
 }
コード例 #3
0
ファイル: SHA256Helper.cs プロジェクト: x360ce/x360ce
        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);
        }