mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
PPP, magic, enables building without PPP_MD5_RANDM support
The only API difference with and without the PPP_MD5_RANDM support is the availability of the random_bytes() function. Added a random_bytes() function on top of magic() when PPP_MD5_RANDM support is not enabled, thus allowing builds for both cases. PPP_MD5_RANDM is still enabled by default (it was mandatory) if a protocol using encryption is enabled, such as CHAP, EAP, or L2TP auth support.
This commit is contained in:
@@ -100,12 +100,6 @@ void magic_randomize(void);
|
||||
*/
|
||||
u32_t magic(void); /* Returns the next magic number */
|
||||
|
||||
/*
|
||||
* Return a new random number between 0 and (2^pow)-1 included.
|
||||
*/
|
||||
u32_t magic_pow(u8_t pow);
|
||||
|
||||
#if PPP_MD5_RANDM
|
||||
/*
|
||||
* Fill buffer with random bytes
|
||||
*
|
||||
@@ -116,8 +110,12 @@ u32_t magic_pow(u8_t pow);
|
||||
* least some degree. Also, it's important to get a good seed before
|
||||
* the first use.
|
||||
*/
|
||||
void random_bytes(unsigned char *buf, u32_t len);
|
||||
#endif /* PPP_MD5_RANDM */
|
||||
void random_bytes(unsigned char *buf, u32_t buf_len);
|
||||
|
||||
/*
|
||||
* Return a new random number between 0 and (2^pow)-1 included.
|
||||
*/
|
||||
u32_t magic_pow(u8_t pow);
|
||||
|
||||
#endif /* MAGIC_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user