mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
crypto/siphash: avoid redefine name issue
Rename siphash related symbols to avoid conflicts with compiler-generated section names. Tricore-gcc produces function sections with '_end' suffix, which conflicts with siphash_end symbol. Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
+3
-3
@@ -126,11 +126,11 @@ void siphash_final(FAR void *dst, FAR SIPHASH_CTX *ctx, int rc, int rf)
|
||||
{
|
||||
uint64_t r;
|
||||
|
||||
htolem64(&r, siphash_end(ctx, rc, rf));
|
||||
htolem64(&r, siphash_finish(ctx, rc, rf));
|
||||
memcpy(dst, &r, sizeof r);
|
||||
}
|
||||
|
||||
uint64_t siphash_end(FAR SIPHASH_CTX *ctx, int rc, int rf)
|
||||
uint64_t siphash_finish(FAR SIPHASH_CTX *ctx, int rc, int rf)
|
||||
{
|
||||
uint64_t r;
|
||||
size_t left;
|
||||
@@ -158,7 +158,7 @@ uint64_t siphash(FAR const SIPHASH_KEY *key,
|
||||
|
||||
siphash_init(&ctx, key);
|
||||
siphash_update(&ctx, rc, rf, src, len);
|
||||
return (siphash_end(&ctx, rc, rf));
|
||||
return (siphash_finish(&ctx, rc, rf));
|
||||
}
|
||||
|
||||
#define SIP_ROTL(x, b) ((x) << (b)) | ( (x) >> (64 - (b)))
|
||||
|
||||
Reference in New Issue
Block a user