diff options
Diffstat (limited to 'src/lib/compat')
-rw-r--r-- | src/lib/compat/sodium/sodium.h | 2 | ||||
-rw-r--r-- | src/lib/compat/sodium/sodium_utils.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/compat/sodium/sodium.h b/src/lib/compat/sodium/sodium.h index 4bb37e974..f43b88abb 100644 --- a/src/lib/compat/sodium/sodium.h +++ b/src/lib/compat/sodium/sodium.h @@ -18,7 +18,7 @@ namespace Botan { namespace Sodium { // sodium/randombytes.h -enum Sodium_Constants { +enum Sodium_Constants : size_t { SODIUM_SIZE_MAX = 0xFFFFFFFF, crypto_aead_chacha20poly1305_ABYTES = 16, diff --git a/src/lib/compat/sodium/sodium_utils.cpp b/src/lib/compat/sodium/sodium_utils.cpp index 208355583..4b7afdb3d 100644 --- a/src/lib/compat/sodium/sodium_utils.cpp +++ b/src/lib/compat/sodium/sodium_utils.cpp @@ -133,7 +133,7 @@ void Sodium::sodium_free(void* ptr) uint8_t* p = static_cast<uint8_t*>(ptr) - 8; const uint64_t len = load_le<uint64_t>(p, 0); - secure_scrub_memory(ptr, len); + secure_scrub_memory(ptr, static_cast<size_t>(len)); std::free(p); } |