Annotation of src/usr.bin/ssh/xmss_commons.c, Revision 1.2
1.2 ! dtucker 1: /* $OpenBSD$ */
1.1 markus 2: /*
3: xmss_commons.c 20160722
4: Andreas Hülsing
5: Joost Rijneveld
6: Public domain.
7: */
8:
9: #include "xmss_commons.h"
10: #include <stdlib.h>
11: #include <stdio.h>
12: #include <stdint.h>
13:
14: void to_byte(unsigned char *out, unsigned long long in, uint32_t bytes)
15: {
16: int32_t i;
17: for (i = bytes-1; i >= 0; i--) {
18: out[i] = in & 0xff;
19: in = in >> 8;
20: }
21: }
22:
23: void hexdump(const unsigned char *a, size_t len)
24: {
25: size_t i;
26: for (i = 0; i < len; i++)
27: printf("%02x", a[i]);
1.2 ! dtucker 28: }