Skip to content

Commit

Permalink
owning?
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Oct 12, 2023
1 parent 44b5b74 commit ff1e40c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/pubnub_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ class crypto_module: public into_crypto_provider_ptr {
*
* @see pubnub_crypto_aes_cbc_module_init
*/
static crypto_module aes_cbc(std::string cipher_key)
static crypto_module aes_cbc(std::string& cipher_key)
{
return crypto_module(pubnub_crypto_aes_cbc_module_init((uint8_t*)(cipher_key.c_str())));
}
Expand All @@ -651,7 +651,7 @@ class crypto_module: public into_crypto_provider_ptr {
*
* @see pubnub_crypto_legacy_module_init
*/
static crypto_module legacy(std::string cipher_key)
static crypto_module legacy(std::string& cipher_key)
{
return crypto_module(pubnub_crypto_legacy_module_init((uint8_t*)(cipher_key.c_str())));
}
Expand Down Expand Up @@ -690,7 +690,7 @@ class crypto_module: public into_crypto_provider_ptr {
to_decrypt.push_back('\0');
pubnub_bymebl_t to_decrypt_c;
to_decrypt_c.ptr = to_decrypt.data();
to_decrypt_c.size = to_decrypt.size() - 1;
to_decrypt_c.size = to_decrypt.size();

pubnub_bymebl_t result = this->d_module->decrypt(this->d_module, to_decrypt_c);
to_decrypt.pop_back();
Expand Down

0 comments on commit ff1e40c

Please sign in to comment.