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