Skip to content
Snippets Groups Projects
Commit 54def794 authored by Niels Möller's avatar Niels Möller
Browse files

* macros.h (FOR_BLOCKS): New macro, taken from lsh.

Rev: src/nettle/macros.h:1.2
parent e09706b4
No related branches found
No related tags found
Loading
......@@ -55,5 +55,11 @@ do { \
(p)[0] = (i) & 0xff; \
} while(0)
/* Macro to make it easier to loop over several blocks. */
#define FOR_BLOCKS(length, dst, src, blocksize) \
assert( !((length) % (blocksize))); \
for (; (length); ((length) -= (blocksize), \
(dst) += (blocksize), \
(src) += (blocksize)) )
#endif /* NETTLE_MACROS_H_INCLUDED */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment