Skip to content

Commit 52db266

Browse files
committed
Added SHA3 algorithms (v3.1)
1 parent 27ce116 commit 52db266

25 files changed

+1522
-85
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [3.1] - 2022-02-08
6+
- New: SHA3-256, SHA3-384, SHA3-512 algorithms support (#18)
7+
58
## [3.0] - 2022-02-01
69
- New: Quickly change hashing algorithms by right-clicking
710
- Improved: Visuals and eye-candies

Hashing/FileSummary.cs

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ public class FileSummary
1010
public string SHA512 { get; set; }
1111
public string CRC32 { get; set; }
1212
public string RIPEMD160 { get; set; }
13+
public string SHA3_256 { get; set; }
14+
public string SHA3_384 { get; set; }
15+
public string SHA3_512 { get; set; }
1316
}
1417
}

Hashing/Forms/CompareForm.Designer.cs

+56-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Hashing/Forms/CompareForm.cs

+33
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ private void LoadActiveHash()
7474
// break;
7575
//}
7676

77+
chkSHA35.Checked = Options.CurrentOptions.HashOptions.SHA3_512;
78+
chkSHA33.Checked = Options.CurrentOptions.HashOptions.SHA3_384;
79+
chkSHA32.Checked = Options.CurrentOptions.HashOptions.SHA3_256;
7780
chkRIPEMD160.Checked = Options.CurrentOptions.HashOptions.RIPEMD160;
7881
chkSHA512.Checked = Options.CurrentOptions.HashOptions.SHA512;
7982
chkSHA384.Checked = Options.CurrentOptions.HashOptions.SHA384;
@@ -126,6 +129,21 @@ private void Compare()
126129
{
127130
if (x.RIPEMD160 == txtExpected.Text) resultBox.Items.Add(x.File);
128131
}
132+
133+
if (chkSHA32.Checked)
134+
{
135+
if (x.SHA3_256 == txtExpected.Text) resultBox.Items.Add(x.File);
136+
}
137+
138+
if (chkSHA33.Checked)
139+
{
140+
if (x.SHA3_384 == txtExpected.Text) resultBox.Items.Add(x.File);
141+
}
142+
143+
if (chkSHA35.Checked)
144+
{
145+
if (x.SHA3_512 == txtExpected.Text) resultBox.Items.Add(x.File);
146+
}
129147
}
130148

131149
if (resultBox.Items.Count > 0)
@@ -208,5 +226,20 @@ private void chkRIPEMD160_CheckedChanged(object sender, EventArgs e)
208226
{
209227
if (chkRIPEMD160.Checked) Options.CurrentOptions.ActiveHash = 7;
210228
}
229+
230+
private void chkSHA32_CheckedChanged(object sender, EventArgs e)
231+
{
232+
if (chkSHA32.Checked) Options.CurrentOptions.ActiveHash = 8;
233+
}
234+
235+
private void chkSHA33_CheckedChanged(object sender, EventArgs e)
236+
{
237+
if (chkSHA33.Checked) Options.CurrentOptions.ActiveHash = 9;
238+
}
239+
240+
private void chkSHA35_CheckedChanged(object sender, EventArgs e)
241+
{
242+
if (chkSHA35.Checked) Options.CurrentOptions.ActiveHash = 10;
243+
}
211244
}
212245
}

0 commit comments

Comments
 (0)