diff options
author | Muller-Castro <37383316+Muller-Castro@users.noreply.github.com> | 2024-01-08 22:36:19 -0300 |
---|---|---|
committer | Muller-Castro <37383316+Muller-Castro@users.noreply.github.com> | 2024-02-14 11:20:36 -0300 |
commit | a8bc9f3e78788bdf0be7348fcbfac15c127f1f48 (patch) | |
tree | cb6029160994d6445123f01ffe142e3e3ff6f96a /core/crypto/aes_context.cpp | |
parent | 907db8eebcecb97d527edcaff77a1c87a6c068f5 (diff) | |
download | redot-engine-a8bc9f3e78788bdf0be7348fcbfac15c127f1f48.tar.gz |
Add const lvalue ref to core/* container parameters
Diffstat (limited to 'core/crypto/aes_context.cpp')
-rw-r--r-- | core/crypto/aes_context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/crypto/aes_context.cpp b/core/crypto/aes_context.cpp index 8a8d3f875e..7596f4e0e2 100644 --- a/core/crypto/aes_context.cpp +++ b/core/crypto/aes_context.cpp @@ -30,7 +30,7 @@ #include "core/crypto/aes_context.h" -Error AESContext::start(Mode p_mode, PackedByteArray p_key, PackedByteArray p_iv) { +Error AESContext::start(Mode p_mode, const PackedByteArray &p_key, const PackedByteArray &p_iv) { ERR_FAIL_COND_V_MSG(mode != MODE_MAX, ERR_ALREADY_IN_USE, "AESContext already started. Call 'finish' before starting a new one."); ERR_FAIL_COND_V_MSG(p_mode < 0 || p_mode >= MODE_MAX, ERR_INVALID_PARAMETER, "Invalid mode requested."); // Key check. @@ -52,7 +52,7 @@ Error AESContext::start(Mode p_mode, PackedByteArray p_key, PackedByteArray p_iv return OK; } -PackedByteArray AESContext::update(PackedByteArray p_src) { +PackedByteArray AESContext::update(const PackedByteArray &p_src) { ERR_FAIL_COND_V_MSG(mode < 0 || mode >= MODE_MAX, PackedByteArray(), "AESContext not started. Call 'start' before calling 'update'."); int len = p_src.size(); ERR_FAIL_COND_V_MSG(len % 16, PackedByteArray(), "The number of bytes to be encrypted must be multiple of 16. Add padding if needed"); |