選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

xtea.h 947B

123456789101112131415161718192021222324252627282930313233
  1. /*! \file xtea.h
  2. \author Thomas.Hoehenleitner [at] seerose.net
  3. *******************************************************************************/
  4. #ifndef TRICE_XTEA_H_
  5. #define TRICE_XTEA_H_
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include <stdint.h> //lint !e537 !e451 Warning 537: Repeated include file, Warning 451: Header file repeatedly included but does not have a standard
  10. void XTEAInitTable(void);
  11. void XTEADecrypt(uint32_t* p, unsigned count);
  12. void XTEAEncrypt(uint32_t* p, unsigned count);
  13. //! little endian! change byte order for big endian machines
  14. #define XTEA_KEY(b00, b01, b02, b03, \
  15. b10, b11, b12, b13, \
  16. b20, b21, b22, b23, \
  17. b30, b31, b32, b33) \
  18. { \
  19. 0x##b00##b01##b02##b03, \
  20. 0x##b10##b11##b12##b13, \
  21. 0x##b20##b21##b22##b23, \
  22. 0x##b30##b31##b32##b33}
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif // TRICE_XTEA_H_