瀏覽代碼

fixed endianess for toByte and base_w

master
Andreas 8 年之前
父節點
當前提交
2b73688b7c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      wots.c
  2. +1
    -1
      xmss_commons.c

+ 1
- 1
wots.c 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存