hmachack.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * until we find a cleaner way, include the BSD md5/sha1 code
  3. * here
  4. */
  5. #ifdef HMAC_HACK
  6. #define LITTLE_ENDIAN 1234
  7. #define BIG_ENDIAN 4321
  8. #ifdef __LITTLE_ENDIAN
  9. #define BYTE_ORDER LITTLE_ENDIAN
  10. #endif
  11. #ifdef __BIG_ENDIAN
  12. #define BYTE_ORDER BIG_ENDIAN
  13. #endif
  14. u_int8_t hmac_ipad_buffer[64] = {
  15. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  16. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  17. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  18. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  19. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  20. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  21. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
  22. 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36
  23. };
  24. u_int8_t hmac_opad_buffer[64] = {
  25. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  26. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  27. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  28. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  29. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  30. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  31. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
  32. 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C
  33. };
  34. #endif /* HMAC_HACK */