Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
OstojaOfficial committed Jul 19, 2019
1 parent 95d50f7 commit cb39a8a
Show file tree
Hide file tree
Showing 18 changed files with 149 additions and 21 deletions.
Binary file added Hash Checker/.vs/Hash Checker/v16/.suo
Binary file not shown.
Empty file.
Binary file not shown.
72 changes: 62 additions & 10 deletions Hash Checker/Hash Checker/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 66 additions & 6 deletions Hash Checker/Hash Checker/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,27 @@ private void Search_Click(object sender, EventArgs e)

private void Hash_Click(object sender, EventArgs e)
{
textMD5.Text = BytesToString(GetHashMD5(txtloc.Text));
textSHA512.Text = BytesToString(GetHashSha1(txtloc.Text));
textSHA256.Text = BytesToString(GetHashSha256(txtloc.Text));
textSHA1.Text = BytesToString(GetHashSha1(txtloc.Text));
if (File.Exists(txtloc.Text))
{
textMD5.Text = BytesToString(GetHashMD5(txtloc.Text));
textSHA512.Text = BytesToString(GetHashSha1(txtloc.Text));
textSHA256.Text = BytesToString(GetHashSha256(txtloc.Text));
textSHA1.Text = BytesToString(GetHashSha1(txtloc.Text));
}
else
{
MessageBox.Show("File doesn't exist.", "Error: File not found");
}

if (texthash.Text == textSHA256.Text || texthash.Text == textSHA1.Text || texthash.Text == textMD5.Text || texthash.Text == textSHA512.Text)
{
match.ForeColor = System.Drawing.Color.Green;
match.Text = "Match";
match.Text = "MATCH";
}
else
{
match.ForeColor = System.Drawing.Color.Red;
match.Text = "No match";
match.Text = "NO MATCH";
}
}

Expand All @@ -67,6 +74,7 @@ public static string BytesToString(byte[] bytes)
return result;
}

#region Algorithms
//MD5
private MD5 Md5 = MD5.Create();

Expand Down Expand Up @@ -110,5 +118,57 @@ private byte[] GetHashSha512(string filename)
return Sha512.ComputeHash(stream);
}
}
#endregion

#region Copy
//Copy
private void Copy1_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textMD5.Text))
{
MessageBox.Show("Textbox cannot be null.", "Error: MD5");
}
else
{
Clipboard.SetText(textMD5.Text);
}
}

private void Copy2_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textSHA1.Text))
{
MessageBox.Show("Textbox cannot be null.", "Error: SHA1");
}
else
{
Clipboard.SetText(textSHA1.Text);
}
}

private void Copy3_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textSHA256.Text))
{
MessageBox.Show("Textbox cannot be null.", "Error: SHA256");
}
else
{
Clipboard.SetText(textSHA256.Text);
}
}

private void Copy4_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textSHA512.Text))
{
MessageBox.Show("Textbox cannot be null.", "Error: SHA512");
}
else
{
Clipboard.SetText(textSHA512.Text);
}
}
#endregion
}
}
16 changes: 16 additions & 0 deletions Hash Checker/Hash Checker/Hash Checker.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project>
Binary file modified Hash Checker/Hash Checker/bin/Debug/Hash Checker.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions Hash Checker/Hash Checker/bin/Debug/Hash Checker.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hash Checker.exe" size="13272">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hash Checker.exe" size="14808">
<assemblyIdentity name="Hash Checker" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>nSdve987f0U2QGilPL962EiW9Bq7WxxdezQo869YWv0=</dsig:DigestValue>
<dsig:DigestValue>mi5a87kItsGFrM0fPikY3ZPnMhZTe0n/0GjQCOPjR0E=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Hash Checker/Hash Checker/bin/Debug/Hash Checker.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Hkm1AszG6MOWpeUJKsqjb5VqVYpv8gvfADcKrfnCo2Q=</dsig:DigestValue>
<dsig:DigestValue>mi0P9hAjnmuzbvO3GLSvAvBlcHsdHDIJe56WYu7XfNs=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified Hash Checker/Hash Checker/obj/Debug/Hash Checker.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions Hash Checker/Hash Checker/obj/Debug/Hash Checker.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hash Checker.exe" size="13272">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hash Checker.exe" size="14808">
<assemblyIdentity name="Hash Checker" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>nSdve987f0U2QGilPL962EiW9Bq7WxxdezQo869YWv0=</dsig:DigestValue>
<dsig:DigestValue>mi5a87kItsGFrM0fPikY3ZPnMhZTe0n/0GjQCOPjR0E=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Hash Checker/Hash Checker/obj/Debug/Hash Checker.pdb
Binary file not shown.

0 comments on commit cb39a8a

Please # to comment.