From 3ecd0b2185c47452b19004d0f4d2782cb29c1bba Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 17 Aug 2017 13:51:10 -0400 Subject: Change type of botan_scrub_mem from uint8_t* to void* The underlying function already takes void* and it makes sense to pass non-byte buffers to this function. --- src/lib/ffi/ffi.cpp | 2 +- src/lib/ffi/ffi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index 044b03335..1dfa66e5f 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -68,7 +68,7 @@ int botan_same_mem(const uint8_t* x, const uint8_t* y, size_t len) return Botan::same_mem(x, y, len) ? 0 : -1; } -int botan_scrub_mem(uint8_t* mem, size_t bytes) +int botan_scrub_mem(void* mem, size_t bytes) { Botan::secure_scrub_memory(mem, bytes); return BOTAN_FFI_SUCCESS; diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h index 6ee286ad3..f59da0545 100644 --- a/src/lib/ffi/ffi.h +++ b/src/lib/ffi/ffi.h @@ -159,7 +159,7 @@ BOTAN_DLL int botan_same_mem(const uint8_t* x, const uint8_t* y, size_t len); * Clear out memory using a system specific approach to bypass elision by the * compiler (currently using RtlSecureZeroMemory or tricks with volatile pointers). */ -BOTAN_DLL int botan_scrub_mem(uint8_t* mem, size_t bytes); +BOTAN_DLL int botan_scrub_mem(void* mem, size_t bytes); #define BOTAN_FFI_HEX_LOWER_CASE 1 -- cgit v1.2.3