* Add state destroy to SHA2 API
* Include optimized SPHINCS+ implementations
I've generated new implementations from the sphincsplus repository.
* Don't destroy sha256ctx after finalize
* Attempt to shut up MSVC
* Make sure to drop errors in rmtree
* Names passed around (mostly constant) value more clearly
* Put ``const`` where applicable (almost everywhere)
* Renamed ``primitive.h``
* Fixed some nits
This PR sacrifices passing some extra arguments to get rid of the global
state.
* Haraka needs state in all hash calls, this results in changes to the
hash functions specified in `hash.h`. The extra pointers passed would
not be necessary for SHA256 or SHAKE256.
* SHAKE256 did not have global state, but uniformity in the implementations
requires us to pass around the new state context anyway. Otherwise,
@joostrijneveld's SPHINCS+ generator doesn't really work anymore).
We introduce a new header file called `primitive.h` which defines the
required state type for the generic functions. I did not go into
replacing _all_ occurrences of state variables by the new `hash_state`
macro.
There are schemes, like SABER (#192) that have more than one principal
submitter. Consistency warrants that we turn it into a list for all
schemes and don't do something with allowing either a str or a list:
that would just be very annoying to parse.
Closes#194