rename to avoid symbol conflict with musl

This commit is contained in:
Christian Grothoff 2022-03-28 18:18:08 +02:00
parent b25c9398b7
commit 3249687b2a
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -90,14 +90,14 @@ derive_key (const void *key_material,
* @param[out] res_size size of the ciphertext * @param[out] res_size size of the ciphertext
*/ */
static void static void
encrypt (const struct NonceP *nonce, contract_encrypt (const struct NonceP *nonce,
const void *key, const void *key,
size_t key_len, size_t key_len,
const void *data, const void *data,
size_t data_size, size_t data_size,
const char *salt, const char *salt,
void **res, void **res,
size_t *res_size) size_t *res_size)
{ {
size_t ciphertext_size; size_t ciphertext_size;
struct SymKeyP skey; struct SymKeyP skey;
@ -134,13 +134,13 @@ encrypt (const struct NonceP *nonce,
* @return #GNUNET_OK on success * @return #GNUNET_OK on success
*/ */
static enum GNUNET_GenericReturnValue static enum GNUNET_GenericReturnValue
decrypt (const void *key, contract_decrypt (const void *key,
size_t key_len, size_t key_len,
const void *data, const void *data,
size_t data_size, size_t data_size,
const char *salt, const char *salt,
void **res, void **res,
size_t *res_size) size_t *res_size)
{ {
const struct NonceP *nonce; const struct NonceP *nonce;
struct SymKeyP skey; struct SymKeyP skey;
@ -251,14 +251,14 @@ TALER_CRYPTO_contract_encrypt_for_merge (
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&nonce, &nonce,
sizeof (nonce)); sizeof (nonce));
encrypt (&nonce, contract_encrypt (&nonce,
&key, &key,
sizeof (key), sizeof (key),
hdr, hdr,
sizeof (*hdr) + cbuf_size, sizeof (*hdr) + cbuf_size,
MERGE_SALT, MERGE_SALT,
econtract, econtract,
econtract_size); econtract_size);
GNUNET_free (hdr); GNUNET_free (hdr);
} }
@ -289,13 +289,13 @@ TALER_CRYPTO_contract_decrypt_for_merge (
return NULL; return NULL;
} }
if (GNUNET_OK != if (GNUNET_OK !=
decrypt (&key, contract_decrypt (&key,
sizeof (key), sizeof (key),
econtract, econtract,
econtract_size, econtract_size,
MERGE_SALT, MERGE_SALT,
&xhdr, &xhdr,
&hdr_size)) &hdr_size))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
return NULL; return NULL;