aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/blake2
Commit message (Collapse)AuthorAgeFilesLines
* Add compile-time rotation functionsJack Lloyd2017-10-121-4/+4
| | | | | | | | | | | | | | | | | The problem with asm rol/ror is the compiler can't schedule effectively. But we only need asm in the case when the rotation is variable, so distinguish the two cases. If a compile time constant, then static_assert that the rotation is in the correct range and do the straightforward expression knowing the compiler will probably do the right thing. Otherwise do a tricky expression that both GCC and Clang happen to have recognize. Avoid the reduction case; instead require that the rotation be in range (this reverts 2b37c13dcf). Remove the asm rotations (making this branch illnamed), because now both Clang and GCC will create a roll without any extra help. Remove the reduction/mask by the word size for the variable case. The compiler can't optimize that it out well, but it's easy to ensure it is valid in the callers, especially now that the variable input cases are easy to grep for.
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-1/+1
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Add HashFunction::copy_stateJack Lloyd2017-05-222-0/+7
| | | | See GH #1037
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-021-1/+3
|
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-182-27/+27
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Remove Algo_RegistryJack Lloyd2016-10-212-7/+0
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-051-1/+1
| | | | explicit.
* Fix indentJack Lloyd2016-01-301-171/+193
|
* Blake2b: use rotate_right instead of a macrocynecx2016-01-271-7/+5
|
* Blake2b: Fix for MSVCcynecx2016-01-261-5/+3
|
* Blake2b: Add copyright & fix header guardcynecx2016-01-262-3/+17
|
* Add Blake2b hash functioncynecx2016-01-263-0/+256