You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
406 B

  1. /*
  2. xmss_commons.c version 20150811
  3. Andreas Hülsing
  4. Public domain.
  5. */
  6. #include "xmss_commons.h"
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. void to_byte(unsigned char *out, unsigned int in, int bytes)
  10. {
  11. int i;
  12. for(i = 0; i < bytes; i++){
  13. out[i] = in & 0xff;
  14. in = in >> 8;
  15. }
  16. }
  17. void hexdump(const unsigned char *a, size_t len)
  18. {
  19. size_t i;
  20. for (i = 0; i < len; i++)
  21. printf("%02x", a[i]);
  22. }