1
0
xmss-KAT-generator/xmss_commons.c
Andreas c37b9dcfca SWITCH from v01 to v03
Versions are incompatible due to different address formats and differing message compression!
2016-02-16 16:31:18 +01:00

26 Zeilen
416 B
C

/*
xmss_commons.c 20160210
Andreas Hülsing
Joost Rijneveld
Public domain.
*/
#include "xmss_commons.h"
#include <stdlib.h>
#include <stdio.h>
void to_byte(unsigned char *out, unsigned int in, int bytes)
{
int i;
for (i = 0; i < bytes; i++) {
out[i] = in & 0xff;
in = in >> 8;
}
}
void hexdump(const unsigned char *a, size_t len)
{
size_t i;
for (i = 0; i < len; i++)
printf("%02x", a[i]);
}