X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=DH-Keccak%2Fassets%2FKremKeccak%2Fkrem_keccak.c;h=7a64c052ee15dc6fe874556bf07884fef19972e4;hb=c64e115f8b6631df419a207f11d394c1b241d2bd;hp=01fe486b90dec22946df1d22300f3b69e1ba03f2;hpb=cc3956690d8b78b422203950e4f829e4821df190;p=mobile-com.git diff --git a/DH-Keccak/assets/KremKeccak/krem_keccak.c b/DH-Keccak/assets/KremKeccak/krem_keccak.c index 01fe486..7a64c05 100644 --- a/DH-Keccak/assets/KremKeccak/krem_keccak.c +++ b/DH-Keccak/assets/KremKeccak/krem_keccak.c @@ -5,9 +5,9 @@ #include #include -#include "../keccak-ref/Sources/KeccakSponge.c" -#include "../keccak-ref/Sources/KeccakF-1600-reference.c" -#include "../keccak-ref/Sources/displayIntermediateValues.c" +#include "KeccakSponge.c" +#include "KeccakF-1600-reference.c" +#include "displayIntermediateValues.c" #define HI_NIBBLE(b) (((b) >> 4) & 0x0F) #define LO_NIBBLE(b) ((b) & 0x0F) @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { r = 576; c = 1024; - state = (spongeState*) calloc(1, sizeof(spongeState)); + state = calloc(1, sizeof(spongeState)); if(stat(argv[1], &input_stat) || input_stat.st_size <= 0) { @@ -55,8 +55,8 @@ int main(int argc, char *argv[]) { exit(1); } - input_buf = (unsigned char *) calloc(1, (size_t) input_stat.st_size); - output_buf = (unsigned char *) calloc(1, (size_t) 64); + input_buf = calloc(1, (size_t) input_stat.st_size); + output_buf = calloc(1, (size_t) 64); if( ! (input_bytes_read = fread(input_buf, 1, (size_t)input_stat.st_size, input))) {