Browse Source

fixed endianess for toByte and base_w

master
Andreas 8 years ago
parent
commit
2b73688b7c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      wots.c
  2. +1
    -1
      xmss_commons.c

+ 1
- 1
wots.c View File

@@ -71,7 +71,7 @@ static void base_w(int *output, const unsigned char *input, int in_len, const wo

for (consumed = 0; consumed < 8 * in_len; consumed += params->log_w) {
if (bits == 0) {
total = input[in_len - 1 - in];
total = input[in];
in++;
bits += 8;
}


+ 1
- 1
xmss_commons.c View File

@@ -12,7 +12,7 @@ Public domain.
void to_byte(unsigned char *out, unsigned int in, int bytes)
{
int i;
for (i = 0; i < bytes; i++) {
for (i = bytes-1; i >= 0; i--) {
out[i] = in & 0xff;
in = in >> 8;
}


Loading…
Cancel
Save