Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
ffcdc8c6
Commit
ffcdc8c6
authored
Aug 24, 2004
by
Simon Josefsson
Committed by
Niels Möller
Aug 24, 2004
Browse files
(LE_READ_UINT16, LE_WRITE_UINT16): New macros.
Rev: src/nettle/macros.h:1.7
parent
deed722a
Changes
1
Hide whitespace changes
Inline
Side-by-side
macros.h
View file @
ffcdc8c6
...
...
@@ -78,6 +78,17 @@ do { \
(p)[0] = (i) & 0xff; \
} while(0)
/* Analogous macros, for 16 bit numbers */
#define LE_READ_UINT16(p) \
( (((uint32_t) (p)[1]) << 8) \
| ((uint32_t) (p)[0]))
#define LE_WRITE_UINT16(p, i) \
do { \
(p)[1] = ((i) >> 8) & 0xff; \
(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))); \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment