Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 binary #13

Open
sergeevabc opened this issue May 9, 2024 · 4 comments
Open

Windows 7 binary #13

sergeevabc opened this issue May 9, 2024 · 4 comments

Comments

@sergeevabc
Copy link

Dear @B7rian, I am not a developer, but an ordinary user, who is looking for the fastest implementation of SHA256 to run on vintage hardware (Core2Duo SSE3 with 4 GB RAM). Could you be so kind to attach *.exe of Ripsum to this issue so that I could try it?

@B7rian
Copy link
Owner

B7rian commented May 16, 2024 via email

@sergeevabc
Copy link
Author

sergeevabc commented May 16, 2024

I have been trying to build ripsum myself using w64devkit by @skeeto, but see no makefile to proceed via make command.

@skeeto
Copy link

skeeto commented May 16, 2024

I see it's a CMake build, and I don't distribute that with w64devkit, but the source is straightforward enough that you don't actually need it. You'll need a development build of OpenSSL, and the FireDaemon one was the simplest option I could find. (Building OpenSSL with GCC requires Perl, so don't bother trying.) Then to build ripsum:

$ c++ -Iopenssl-3/x64/include -Lopenssl-3/x64/lib -o ripsum src/*.cpp -lssl -lcrypto

Optimize to taste. (IMHO, depending on OpenSSL just for SHA-256 is rather excessive. On the other hand, that implementation does seem to be quite well-optimized!)

However, there was one issue in ChecksumLine.cpp converting the regex capture into a path, which doesn't compile. This might be a bug in ripsum, or maybe a bug in libstdc++. (I give it 50/50 odds.) I had to convert through a string:

--- a/src/ChecksumLine.cpp
+++ b/src/ChecksumLine.cpp
@@ -50,3 +50,3 @@ ChecksumLine::ChecksumLine(std::string aLine)
 	//but this was throwing an exception on Linux 
-    mPath = captures[2];
+    mPath = std::string{captures[2]};
 

I'm not so familiar with std::filesystem. In theory the string ought to be decoded through std::filesystem::u8path, but in my tests it automatically decoded as UTF-8 without it anyway, and wide paths worked fine.

@B7rian
Copy link
Owner

B7rian commented May 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants