diff --git a/core/pbcc_crypto.c b/core/pbcc_crypto.c index 9d80d419..690aa637 100644 --- a/core/pbcc_crypto.c +++ b/core/pbcc_crypto.c @@ -160,14 +160,14 @@ static int aes_decrypt( pubnub_bymebl_t decoded = pbbase64_decode_alloc_std((char*)to_decrypt.data.ptr, to_decrypt.data.size); if (decoded.ptr == NULL) { - return -2; + return -1; } size_t dec_buffer_size = estimated_dec_buffer_size(to_decrypt.data.size) + 5000; // TODO: Why do I need additional space? result->ptr = (uint8_t *)malloc(dec_buffer_size); if (result->ptr == NULL) { - return -3; + return -1; } result->size = dec_buffer_size; @@ -180,7 +180,7 @@ static int aes_decrypt( )) { free(result->ptr); free(decoded.ptr); - return -4; + return -1; } return 0; diff --git a/core/pbcc_crypto_unit_tests.c b/core/pbcc_crypto_unit_tests.c index d0367804..b3dcea1b 100644 --- a/core/pbcc_crypto_unit_tests.c +++ b/core/pbcc_crypto_unit_tests.c @@ -78,8 +78,6 @@ void assert_that_cryptor_works_as_expected(pubnub_crypto_algorithm_t *sut) { int encryption_result = sut->encrypt(sut, &encrypted, to_encrypt); assert_that(encryption_result, is_equal_to(0)); - printf("Encrypted data: %s\n", encrypted.data.ptr); - pubnub_bymebl_t decrypted; decrypted.ptr = NULL; decrypted.size = 0;