4 #ifdef WITH_OPENSSL_SHA1
5 #include <openssl/sha.h>
12 #ifndef WITH_OPENSSL_SHA1
19 void fr_SHA1Transform(uint32_t state[5], const uint8_t buffer[64]);
20 void fr_SHA1Init(fr_SHA1_CTX* context);
21 void fr_SHA1Update(fr_SHA1_CTX* context, const uint8_t* data, unsigned int len);
22 void fr_SHA1Final(uint8_t digest[20], fr_SHA1_CTX* context);
25 * this version implements a raw SHA1 transform, no length is appended,
26 * nor any 128s out to the block size.
28 * Hmm... this function doesn't appear to be used anywhere.
30 void fr_SHA1FinalNoLen(uint8_t digest[20], fr_SHA1_CTX* context);
32 #else /* WITH_OPENSSL_SHA1 */
34 #define fr_SHA1_CTX SHA_CTX
35 #define fr_SHA1Init SHA1_Init
36 #define fr_SHA1Update SHA1_Update
37 #define fr_SHA1Final SHA1_Final
38 #define fr_SHA1Transform SHA1_Transform
42 * FIPS 186-2 PRF based upon SHA1.
44 * Hmm... this is only used in src/modules/rlm_eap/libeap/
45 * why is the prototype here?
47 extern void fips186_2prf(uint8_t mk[20], uint8_t finalkey[160]);
53 #endif /* _FR_SHA1_H */