summaryrefslogtreecommitdiff
path: root/modules/mbedtls
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-15 12:04:21 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-28 10:39:56 +0000
commit5b937d493f0046543a77a0be7920ad39f1e5fc3c (patch)
tree975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /modules/mbedtls
parent886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff)
Rename empty() to is_empty()
Diffstat (limited to 'modules/mbedtls')
-rw-r--r--modules/mbedtls/crypto_mbedtls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp
index 4ea38ebd60..56bdd20e6b 100644
--- a/modules/mbedtls/crypto_mbedtls.cpp
+++ b/modules/mbedtls/crypto_mbedtls.cpp
@@ -205,7 +205,7 @@ Error HMACContextMbedTLS::start(HashingContext::HashType p_hash_type, PackedByte
ERR_FAIL_COND_V_MSG(ctx != nullptr, ERR_FILE_ALREADY_IN_USE, "HMACContext already started.");
// HMAC keys can be any size.
- ERR_FAIL_COND_V_MSG(p_key.empty(), ERR_INVALID_PARAMETER, "Key must not be empty.");
+ ERR_FAIL_COND_V_MSG(p_key.is_empty(), ERR_INVALID_PARAMETER, "Key must not be empty.");
hash_type = p_hash_type;
mbedtls_md_type_t ht = CryptoMbedTLS::md_type_from_hashtype(p_hash_type, hash_len);
@@ -224,7 +224,7 @@ Error HMACContextMbedTLS::start(HashingContext::HashType p_hash_type, PackedByte
Error HMACContextMbedTLS::update(PackedByteArray p_data) {
ERR_FAIL_COND_V_MSG(ctx == nullptr, ERR_INVALID_DATA, "Start must be called before update.");
- ERR_FAIL_COND_V_MSG(p_data.empty(), ERR_INVALID_PARAMETER, "Src must not be empty.");
+ ERR_FAIL_COND_V_MSG(p_data.is_empty(), ERR_INVALID_PARAMETER, "Src must not be empty.");
int ret = mbedtls_md_hmac_update((mbedtls_md_context_t *)ctx, (const uint8_t *)p_data.ptr(), (size_t)p_data.size());
return ret ? FAILED : OK;