kerukuro / digestpp Goto Github PK
View Code? Open in Web Editor NEWC++11 header-only message digest library
License: The Unlicense
C++11 header-only message digest library
License: The Unlicense
Lines 19 to 26 in 99d5382
for BLAKE2bf and BLAKE2sf https://eprint.iacr.org/2019/1492.pdf
for BLAKE3 https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf
This library is not header-only, we have to include a bunch of file to get it work, and it's a big mess.
#define NOMINMAX should before including any of Windows / Platform SDK header. Otherwise min/max macroses from there break std::min and std::max giving syntax errors during compilation
Reference: https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included
When i try to compile digestpp with asio (header only), the compiler fails with this message:
inc/digestpp/algorithm/detail/sha3_provider.hpp:40:13:
error: expected unqualified-id before numeric constant
uint64_t B0 = A[0 * 5 + 0] ^ D[0];
^
The issue is because asio includes termios.h and termios.h define B0 as 00000000. Like this:
#define B0 0000000 /* hang up */
I think the solution may can be replace the variable B0
with another name or is there a better solution?
As per BLAKE3-team/BLAKE3#19 (comment)
It might be a good idea to include reduced round skein for possible speedup, for both standard and tree versions of skein.
Platform and compiler:
Windows 7 x64 [Version 6.1.7601]
Microsoft Visual Studio Community 2017 Version 15.9.26
VisualStudio.15.Release/15.9.26+28307.1234
Visual C++ 2017 00369-60000-00001-AA395
Compiling test.cc with VS2017 using x86 debug/release:
Groestl/256 error: expected 8c7ad62eb26a21297bc39c2d7293b4bd4d3399fa8afab29e970471739e28b301, actual b70d81f0215c295a43193b0439d688d852f417a186f173bededd5a5d71c5f17b
Groestl/512 error: expected badc1f70ccd69e0cf3760c3f93884289da84ec13c70b3d12a53a7a8a4a513f99715d46288f55e1dbf926e6d084a0538e4eebfc91cf2b21452921ccde9131718d, actual 545f354922267ece6b14fa129074058acd34b3314d65b30be3d29a64d92355ee2dee2086dfc9028e0c2aa455fd05e18b3544697b522533a5640ac40c9766d258
Self-test completed with 2 errors.
Compiling test.cc with VS2017 using x64 debug/release, execution passes witout any error.
g++ x64 compilation and execution also passed without any error.
Hi @kerukuro,
I'm getting a single error when trying to use digestpp
:
algorithm/detail/groestl_provider.hpp:124:26: error:
call to 'byteswap' is ambiguous
h[hs > 256 ? 15 : 7] = byteswap(hash_size());
^~~~~~~~
It seems to be getting confused between uint(16/32/64)_t
types.
If I comment out the #include for groestl_provider.hpp
, everything works great.
Any ideas? Thanks much.
Data types like uint32_t, uint64_t cann't be accepted without this header file.
A small fix will be enough.
Do you plan to choose a license for your project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.