Skip to content

Commit bb5ea12

Browse files
committed
move LTC_BYTE macro from tomcrypt_macros.h to tomcrypt_private.h
1 parent 1bbbc60 commit bb5ea12

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/headers/tomcrypt_macros.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,6 @@ static inline ulong64 ROR64(ulong64 word, int i)
429429
#define LTC_UNUSED_PARAM(x) (void)(x)
430430
#endif
431431

432-
/* extract a byte portably */
433-
#ifdef _MSC_VER
434-
#define LTC_BYTE(x, n) ((unsigned char)((x) >> (8 * (n))))
435-
#else
436-
#define LTC_BYTE(x, n) (((x) >> (8 * (n))) & 255)
437-
#endif
438-
439432
/* there is no snprintf before Visual C++ 2015 */
440433
#if defined(_MSC_VER) && _MSC_VER < 1900
441434
#define snprintf _snprintf

src/headers/tomcrypt_private.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ int which ## _export(unsigned char *out, unsigned long *outlen, prng_state *prng
340340
return CRYPT_OK; \
341341
}
342342

343+
/* extract a byte portably */
344+
#ifdef _MSC_VER
345+
#define LTC_BYTE(x, n) ((unsigned char)((x) >> (8 * (n))))
346+
#else
347+
#define LTC_BYTE(x, n) (((x) >> (8 * (n))) & 255)
348+
#endif
343349

344350
/* ref: $Format:%D$ */
345351
/* git commit: $Format:%H$ */

0 commit comments

Comments
 (0)