Embedded chacha: Distinguish via dedicated macro
Set embedding expectations via CHACHA_EMBED macro rather than _KERNEL definition. No functional change. Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
addfc6364f
commit
243e09430a
@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libc_private.h"
|
||||
#include "un-namespace.h"
|
||||
|
||||
#define CHACHA_EMBED
|
||||
#define KEYSTREAM_ONLY
|
||||
#include "chacha.c"
|
||||
|
||||
|
@ -20,10 +20,10 @@ Public domain.
|
||||
#define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN)
|
||||
#define CHACHA_BLOCKLEN 64
|
||||
|
||||
#ifdef _KERNEL
|
||||
#define LOCAL
|
||||
#else
|
||||
#ifdef CHACHA_EMBED
|
||||
#define LOCAL static
|
||||
#else
|
||||
#define LOCAL
|
||||
#endif
|
||||
|
||||
LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
|
||||
|
Loading…
Reference in New Issue
Block a user