Skip to content

Commit e5e7540

Browse files
committed
Security update v3.5
1 parent 04e6f2d commit e5e7540

11 files changed

+62
-33
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Hashing Changelog
22

3-
All notable changes to this project will be documented in this file.
3+
## [3.5] - 2022-10-19
4+
- New: Show File request in Find Identicals (#24)
5+
- Security: Newtonsoft.JSON and CRC32.NET updated to latest version
6+
- Hotfix: Much faster list rendering after hash calculation (#23)
47

58
## [3.4] - 2022-02-15
69
- Hotfix: Propely show files (#20)

Hashing/Crc32.NET.dll

1 KB
Binary file not shown.

Hashing/Forms/IdenticalsForm.Designer.cs

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Hashing/Forms/IdenticalsForm.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private void SaveJson()
8383
File.WriteAllText(dialog.FileName, JsonConvert.SerializeObject(_identicals, Formatting.Indented, new JsonSerializerSettings
8484
{
8585
NullValueHandling = NullValueHandling.Ignore
86-
})) ;
86+
}));
8787
}
8888
catch (Exception ex)
8989
{
@@ -144,7 +144,7 @@ private void ListIdenticals(HashCode algo)
144144

145145
_identicals.FindAll(z => z.SHA256 == x).ForEach(y =>
146146
{
147-
fileNode.Nodes.Add(y.File);
147+
fileNode.Nodes.Add(y.File);
148148
});
149149

150150
nodes.Add(fileNode);
@@ -374,5 +374,25 @@ private void IdenticalsForm_Resize(object sender, EventArgs e)
374374
Y = panel1.Height / 2 - boxSelectHash.Height / 2
375375
};
376376
}
377+
378+
private void FindFile()
379+
{
380+
if (SumView.Nodes.Count > 0)
381+
{
382+
if (SumView.SelectedNode.Nodes.Count > 0)
383+
{
384+
Utilities.FindFile(SumView.SelectedNode.Nodes[0].Text);
385+
}
386+
else
387+
{
388+
Utilities.FindFile(SumView.SelectedNode.Text);
389+
}
390+
}
391+
}
392+
393+
private void toolStripMenuItem1_Click(object sender, EventArgs e)
394+
{
395+
FindFile();
396+
}
377397
}
378398
}

Hashing/Forms/MainForm.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ private void RefreshSumList()
443443
if ((SumResult.Sums != null) && (SumResult.Sums.Count > 0))
444444
{
445445
SumView.Nodes.Clear();
446+
List<TreeNode> tmpNodes = new List<TreeNode>();
446447

447448
foreach (SumResult sr in SumResult.Sums)
448449
{
@@ -462,10 +463,10 @@ private void RefreshSumList()
462463
if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + sr.SHA3_384);
463464
if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + sr.SHA3_512);
464465

465-
SumView.Nodes.Add(rootNode);
466-
466+
tmpNodes.Add(rootNode);
467467
}
468468

469+
SumView.Nodes.AddRange(tmpNodes.ToArray());
469470
SumView.ExpandAll();
470471
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
471472
}
@@ -943,6 +944,7 @@ private void CalculateSums(bool analyzeJson = false)
943944

944945
TreeNode rootNode = null;
945946
_analyzedFiles = new List<string>();
947+
List<TreeNode> tmpNodes = new List<TreeNode>();
946948

947949
if (analyzeJson)
948950
{
@@ -1014,10 +1016,7 @@ private void CalculateSums(bool analyzeJson = false)
10141016
if (SumResult.Sums[i].SHA3_512 == _fileSummaries[i].SHA3_512) _analyzedFiles.Add(_fileSummaries[i].File);
10151017
}
10161018

1017-
SumView.Invoke((MethodInvoker)delegate
1018-
{
1019-
SumView.Nodes.Add(rootNode);
1020-
});
1019+
tmpNodes.Add(rootNode);
10211020
}
10221021
}
10231022
else
@@ -1040,19 +1039,17 @@ private void CalculateSums(bool analyzeJson = false)
10401039
if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + SumResult.Sums[i].SHA3_384);
10411040
if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + SumResult.Sums[i].SHA3_512);
10421041

1043-
SumView.Invoke((MethodInvoker)delegate
1044-
{
1045-
SumView.Nodes.Add(rootNode);
1046-
});
1042+
tmpNodes.Add(rootNode);
10471043
}
10481044
}
10491045

1050-
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
10511046
SumView.Invoke((MethodInvoker)delegate
10521047
{
1048+
SumView.Nodes.AddRange(tmpNodes.ToArray());
10531049
SumView.ExpandAll();
10541050

10551051
});
1052+
_allSums = SumView.Nodes.Cast<TreeNode>().ToArray();
10561053

10571054
lblCalculating.Invoke((MethodInvoker)delegate
10581055
{
@@ -1436,7 +1433,7 @@ private void FilterTable()
14361433

14371434
private void SumView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
14381435
{
1439-
1436+
14401437
}
14411438
}
14421439
}

Hashing/Hashing.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<Prefer32Bit>false</Prefer32Bit>
2626
</PropertyGroup>
2727
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<PlatformTarget>x64</PlatformTarget>
2929
<DebugType>pdbonly</DebugType>
3030
<Optimize>true</Optimize>
3131
<OutputPath>bin\Release\</OutputPath>
@@ -39,11 +39,10 @@
3939
</PropertyGroup>
4040
<ItemGroup>
4141
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Crc32.NET.1.1.0\lib\net20\Crc32.NET.dll</HintPath>
42+
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
4343
</Reference>
44-
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
45-
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
46-
<Private>True</Private>
44+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
45+
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
4746
</Reference>
4847
<Reference Include="System" />
4948
<Reference Include="System.Core" />
@@ -186,8 +185,6 @@
186185
</ItemGroup>
187186
<ItemGroup>
188187
<EmbeddedResource Include="Newtonsoft.Json.dll" />
189-
</ItemGroup>
190-
<ItemGroup>
191188
<None Include="Resources\hashing.png" />
192189
<EmbeddedResource Include="Crc32.NET.dll" />
193190
<Content Include="hashing.ico" />

Hashing/Newtonsoft.Json.dll

172 KB
Binary file not shown.

Hashing/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static class Program
1212

1313
// Enter current version here
1414
internal readonly static float Major = 3;
15-
internal readonly static float Minor = 4;
15+
internal readonly static float Minor = 5;
1616

1717
/* END OF VERSION PROPERTIES */
1818

Hashing/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Crc32.NET" version="1.1.0" targetFramework="net452" />
4-
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
3+
<package id="Crc32.NET" version="1.2.0" targetFramework="net452" />
4+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
55
</packages>

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Simple utility to calculate and compare hashes of multiple files
88
<p align="center">
9-
<a href="https://github.com/hellzerg/hashing/releases/download/3.4/Hashing-3.4.exe" target="_blank">
9+
<a href="https://github.com/hellzerg/hashing/releases/download/3.5/Hashing-3.5.exe" target="_blank">
1010
<img src="download-button.png">
1111
</a>
1212
</p>
@@ -57,6 +57,6 @@ https://github.com/hellzerg/hashing/blob/master/IMAGES.md
5757

5858
## Details: ##
5959

60-
* Latest version: 3.4
61-
* Released: February 15, 2022
62-
* SHA256: 066D3090044D5D77D4B2454C013E56648363EC329D13750B416B4C69B0AAE4AA
60+
* Latest version: 3.5
61+
* Released: October 19, 2022
62+
* SHA256: 70934C870A61F5BA60A2C0934B5523C52FEA81180F76B7868727E97EF46AB584

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4
1+
3.5

0 commit comments

Comments
 (0)