Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/random/hash.c
Show All 37 Lines | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <threads.h> | #include <threads.h> | ||||
#include "unit_test.h" | #include "unit_test.h" | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#include <crypto/rijndael/rijndael-api-fst.h> | #include <crypto/rijndael/rijndael-api-fst.h> | ||||
#include <crypto/sha2/sha2.h> | #include <crypto/sha2/sha256.h> | ||||
#include <dev/random/hash.h> | #include <dev/random/hash.h> | ||||
/* This code presumes that RANDOM_KEYSIZE is twice as large as RANDOM_BLOCKSIZE */ | /* This code presumes that RANDOM_KEYSIZE is twice as large as RANDOM_BLOCKSIZE */ | ||||
CTASSERT(RANDOM_KEYSIZE == 2*RANDOM_BLOCKSIZE); | CTASSERT(RANDOM_KEYSIZE == 2*RANDOM_BLOCKSIZE); | ||||
/* Initialise the hash */ | /* Initialise the hash */ | ||||
void | void | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |