Closed manuel-domke closed 6 years ago
Another change worth a note: I've moved keccakState to a local variable in libinfnoise.c, so it doesn't have to be passed with each readData call.
Not to sure if this was a good idea - but from the point of a library user I would not want to carry around the keccakState all the time.
Same is for ftdi_context, which I plan to remove from the interface methods as well.
All changes merged with #65
I made a big refactoring towards libinfnoise. Touched almost everything.
It compiles a shared lib "libinfnoise.so". Some examples are under software/examples/libinfnoise.
The infnoise driver still relies on one or two functions defined in libinfnoise_private.h and uses a static version of the lib, but almost all code is shared. Also wrote tests (using the added bats submodules) to ensure proper function of the binary.
To be able to return the data from the lib functions I added result arrays (which are only written to when noOutput==true and result!=NULL).
Some things to be improved later on:
The critical parts are done, but error handling needed some bigger changes. Please review.