Lines Matching refs:ciphertext

321 	zend_string   *ciphertext;  in PHP_FUNCTION()  local
348 ciphertext = zend_string_alloc((size_t) msg_len + crypto_secretbox_MACBYTES, 0); in PHP_FUNCTION()
349 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
352 zend_string_efree(ciphertext); in PHP_FUNCTION()
356 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION() local
358 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
365 unsigned char *ciphertext; in PHP_FUNCTION() local
372 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
391 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
731 zend_string *ciphertext; in PHP_FUNCTION() local
762 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_MACBYTES, 0); in PHP_FUNCTION()
763 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
766 zend_string_efree(ciphertext); in PHP_FUNCTION()
770 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION() local
772 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
778 unsigned char *ciphertext; in PHP_FUNCTION() local
788 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
808 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
821 zend_string *ciphertext; in PHP_FUNCTION() local
841 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_SEALBYTES, 0); in PHP_FUNCTION()
842 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
844 zend_string_efree(ciphertext); in PHP_FUNCTION()
848 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION() local
850 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
856 unsigned char *ciphertext; in PHP_FUNCTION() local
864 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
879 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1212 zend_string *ciphertext; in PHP_FUNCTION() local
1238 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1239 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1241 zend_string_efree(ciphertext); in PHP_FUNCTION()
1245 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1247 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1252 zend_string *ciphertext; in PHP_FUNCTION() local
1277 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1278 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1280 zend_string_efree(ciphertext); in PHP_FUNCTION()
1284 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1286 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1292 zend_string *ciphertext; in PHP_FUNCTION() local
1318 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1319 if (crypto_stream_xchacha20((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1321 zend_string_free(ciphertext); in PHP_FUNCTION()
1325 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1327 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1332 zend_string *ciphertext; in PHP_FUNCTION() local
1357 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1358 if (crypto_stream_xchacha20_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1360 zend_string_free(ciphertext); in PHP_FUNCTION()
1364 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1366 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1371 zend_string *ciphertext; in PHP_FUNCTION() local
1399 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1400 if (crypto_stream_xchacha20_xor_ic((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1403 zend_string_free(ciphertext); in PHP_FUNCTION()
1407 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1409 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1750 zend_string *ciphertext; in PHP_FUNCTION() local
1787 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1789 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1792 zend_string_efree(ciphertext); in PHP_FUNCTION()
1798 zend_string_efree(ciphertext); in PHP_FUNCTION()
1802 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1803 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1805 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1812 unsigned char *ciphertext; in PHP_FUNCTION() local
1823 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1853 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
1872 zend_string *ciphertext; in PHP_FUNCTION() local
1905 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1907 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1910 zend_string_efree(ciphertext); in PHP_FUNCTION()
1916 zend_string_efree(ciphertext); in PHP_FUNCTION()
1920 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1921 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1923 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1930 unsigned char *ciphertext; in PHP_FUNCTION() local
1941 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1967 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
1985 zend_string *ciphertext; in PHP_FUNCTION() local
2022 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2024 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2027 zend_string_efree(ciphertext); in PHP_FUNCTION()
2033 zend_string_efree(ciphertext); in PHP_FUNCTION()
2037 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2038 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2040 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2047 unsigned char *ciphertext; in PHP_FUNCTION() local
2058 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2089 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2108 zend_string *ciphertext; in PHP_FUNCTION() local
2141 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2143 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2146 zend_string_efree(ciphertext); in PHP_FUNCTION()
2152 zend_string_efree(ciphertext); in PHP_FUNCTION()
2156 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2157 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2159 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2166 unsigned char *ciphertext; in PHP_FUNCTION() local
2177 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2208 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()