Browse Source

libwally: fix hmac_sha256 name clash.

This is a workaround; eventually libwally will be a nice shared library that
we won't have to bundle, and clashing with internal symbols won't be
a problem.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
9624a1a10e
  1. 1
      libwally-core/1README
  2. 2
      libwally-core/src/hmac.c
  3. 4
      libwally-core/src/hmac.h

1
libwally-core/1README

@ -0,0 +1 @@
Stolen from 3b025127cbf11912f8b95e7ff3c905d74e8433ce, with hmac_256 -> hmac_256_internal to avoid name clash

2
libwally-core/src/hmac.c

@ -8,7 +8,7 @@
#define SHA_T sha256
#define SHA_CTX_MEMBER u32
#define SHA_PRE(name) sha256 ## name
#define HMAC_FUNCTION hmac_sha256
#define HMAC_FUNCTION hmac_sha256_internal
#define WALLY_HMAC_FUNCTION wally_hmac_sha256
#include "hmac.inl"

4
libwally-core/src/hmac.h

@ -5,7 +5,7 @@ struct sha256;
struct sha512;
/**
* hmac_sha256 - Compute an HMAC using SHA-256
* hmac_sha256_internal - Compute an HMAC using SHA-256
*
* @sha: Destination for the resulting HMAC.
* @key: The key for the hash
@ -13,7 +13,7 @@ struct sha512;
* @msg: The message to hash
* @msg_len: The length of @msg in bytes.
*/
void hmac_sha256(struct sha256 *sha,
void hmac_sha256_internal(struct sha256 *sha,
const unsigned char *key, size_t key_len,
const unsigned char *msg, size_t msg_len);

Loading…
Cancel
Save