#include "sha3.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
|
#define | rol(x, s) (((x) << s) | ((x) >> (64 - s))) |
|
#define | REPEAT6(e) e e e e e e |
|
#define | REPEAT24(e) REPEAT6(e e e e) |
|
#define | REPEAT5(e) e e e e e |
|
#define | FOR5(v, s, e) |
|
#define | _(S) do { S } while (0) |
|
#define | FOR(i, ST, L, S) _(for (size_t i = 0; i < L; i += ST) { S; }) |
|
#define | mkapply_ds(NAME, S) |
|
#define | mkapply_sd(NAME, S) |
|
#define | P keccakf |
|
#define | Plen 200 |
|
#define | foldP(I, L, F) |
|
#define | defsha3(bits) |
|
#define _ |
( |
|
S | ) |
do { S } while (0) |
Value:int sha3_##bits(uint8_t* out, size_t outlen, \
const uint8_t* in,
size_t inlen) {
\ if (outlen > (bits/8)) { \
return -1; \
} \
return hash(out, outlen, in, inlen, 200 - (bits / 4), 0x01); \
}
if(a.IndicesBefore(b, len, lenIndices))
Definition at line 140 of file sha3.c.
#define foldP |
( |
|
I, |
|
|
|
L, |
|
|
|
F |
|
) |
| |
#define FOR |
( |
|
i, |
|
|
|
ST, |
|
|
|
L, |
|
|
|
S |
|
) |
| _(for (size_t i = 0; i < L; i += ST) { S; }) |
Value:
Definition at line 42 of file sha3.c.
#define mkapply_ds |
( |
|
NAME, |
|
|
|
S |
|
) |
| |
Value:static inline void NAME(uint8_t* dst, \
const uint8_t* src, \
}
Definition at line 88 of file sha3.c.
#define mkapply_sd |
( |
|
NAME, |
|
|
|
S |
|
) |
| |
Value:static inline void NAME(const uint8_t* src, \
uint8_t* dst, \
}
Definition at line 94 of file sha3.c.
#define REPEAT5 |
( |
|
e | ) |
e e e e e |
#define rol |
( |
|
x, |
|
|
|
s |
|
) |
| (((x) << s) | ((x) >> (64 - s))) |
mkapply_ds |
( |
xorin |
, |
|
|
dst^ |
[i] = src[i] |
|
) |
| |