From c30b61589981f3420343a3fb517f7607939de345 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 30 Oct 2016 18:56:54 +0200 Subject: [PATCH] shared/crypto: Use void * instead of uint8_t * for random data Make the API friendlier by letting the caller pass arbitrary pointer. --- src/shared/crypto.c | 2 +- src/shared/crypto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/crypto.c b/src/shared/crypto.c index 6de5514c8..ce0dcd638 100644 --- a/src/shared/crypto.c +++ b/src/shared/crypto.c @@ -193,7 +193,7 @@ void bt_crypto_unref(struct bt_crypto *crypto) } bool bt_crypto_random_bytes(struct bt_crypto *crypto, - uint8_t *buf, uint8_t num_bytes) + void *buf, uint8_t num_bytes) { ssize_t len; diff --git a/src/shared/crypto.h b/src/shared/crypto.h index 84d499280..1e1b4836d 100644 --- a/src/shared/crypto.h +++ b/src/shared/crypto.h @@ -32,7 +32,7 @@ struct bt_crypto *bt_crypto_ref(struct bt_crypto *crypto); void bt_crypto_unref(struct bt_crypto *crypto); bool bt_crypto_random_bytes(struct bt_crypto *crypto, - uint8_t *buf, uint8_t num_bytes); + void *buf, uint8_t num_bytes); bool bt_crypto_e(struct bt_crypto *crypto, const uint8_t key[16], const uint8_t plaintext[16], uint8_t encrypted[16]); -- 2.47.3