Skip to content

Commit

Permalink
Use NanaZip.Codecs.Hash.BCryptProvider instead of RHash to implement …
Browse files Browse the repository at this point in the history
…the MD5 hash algorithms.
  • Loading branch information
MouriNaruto committed Dec 4, 2024
1 parent 85f84c3 commit 8c15300
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 435 deletions.
10 changes: 10 additions & 0 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.BCryptProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,14 @@ namespace NanaZip::Codecs::Hash
{
return new BCryptProvider(BCRYPT_MD5_ALGORITHM);
}

IHasher* CreateSha384()
{
return new BCryptProvider(BCRYPT_SHA384_ALGORITHM);
}

IHasher* CreateSha512()
{
return new BCryptProvider(BCRYPT_SHA512_ALGORITHM);
}
}
64 changes: 0 additions & 64 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Sha384.cpp

This file was deleted.

64 changes: 0 additions & 64 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Sha512.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
<ClCompile Include="NanaZip.Codecs.Hash.Sha3256.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha3384.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha3512.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha384.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha512.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sm3.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Snefru128.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Snefru256.cpp" />
Expand Down Expand Up @@ -233,7 +231,6 @@
<ClCompile Include="RHash\rhash_util.c" />
<ClCompile Include="RHash\ripemd-160.c" />
<ClCompile Include="RHash\sha3.c" />
<ClCompile Include="RHash\sha512.c" />
<ClCompile Include="RHash\snefru.c">
<DisableSpecificWarnings>4127;</DisableSpecificWarnings>
</ClCompile>
Expand Down Expand Up @@ -436,7 +433,6 @@
<ClInclude Include="RHash\sha1.h" />
<ClInclude Include="RHash\sha256.h" />
<ClInclude Include="RHash\sha3.h" />
<ClInclude Include="RHash\sha512.h" />
<ClInclude Include="RHash\snefru.h" />
<ClInclude Include="RHash\tiger.h" />
<ClInclude Include="RHash\torrent.h" />
Expand Down
15 changes: 0 additions & 15 deletions NanaZip.Codecs/NanaZip.Codecs.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
<ClCompile Include="RHash\md4.c">
<Filter>RHash</Filter>
</ClCompile>
<ClCompile Include="RHash\md5.c">
<Filter>RHash</Filter>
</ClCompile>
<ClCompile Include="RHash\ripemd-160.c">
<Filter>RHash</Filter>
</ClCompile>
Expand All @@ -74,9 +71,6 @@
<ClCompile Include="RHash\sha3.c">
<Filter>RHash</Filter>
</ClCompile>
<ClCompile Include="RHash\sha512.c">
<Filter>RHash</Filter>
</ClCompile>
<ClCompile Include="RHash\snefru.c">
<Filter>RHash</Filter>
</ClCompile>
Expand Down Expand Up @@ -386,11 +380,8 @@
<ClCompile Include="NanaZip.Codecs.Hash.Gost12512.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Has160.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Md4.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Md5.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Ripemd160.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha224.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha384.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha512.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha3224.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha3256.cpp" />
<ClCompile Include="NanaZip.Codecs.Hash.Sha3384.cpp" />
Expand Down Expand Up @@ -517,9 +508,6 @@
<ClInclude Include="RHash\md4.h">
<Filter>RHash</Filter>
</ClInclude>
<ClInclude Include="RHash\md5.h">
<Filter>RHash</Filter>
</ClInclude>
<ClInclude Include="RHash\ripemd-160.h">
<Filter>RHash</Filter>
</ClInclude>
Expand All @@ -532,9 +520,6 @@
<ClInclude Include="RHash\sha3.h">
<Filter>RHash</Filter>
</ClInclude>
<ClInclude Include="RHash\sha512.h">
<Filter>RHash</Filter>
</ClInclude>
<ClInclude Include="RHash\snefru.h">
<Filter>RHash</Filter>
</ClInclude>
Expand Down
Loading

0 comments on commit 8c15300

Please sign in to comment.