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.

19 lines
327 B

  1. #include "xmss_commons.h"
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. void to_byte(unsigned char *out, uint in, int bytes)
  5. {
  6. int i;
  7. for(i = 0; i < bytes; i++){
  8. out[i] = in & 0xff;
  9. in = in >> 8;
  10. }
  11. }
  12. void hexdump(const unsigned char *a, size_t len)
  13. {
  14. size_t i;
  15. for (i = 0; i < len; i++)
  16. printf("%02x", a[i]);
  17. }