Lines Matching refs:ciphertext
320 zend_string *ciphertext; in PHP_FUNCTION() local
347 ciphertext = zend_string_alloc((size_t) msg_len + crypto_secretbox_MACBYTES, 0); in PHP_FUNCTION()
348 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
351 zend_string_efree(ciphertext); in PHP_FUNCTION()
355 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION() local
357 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
364 unsigned char *ciphertext; in PHP_FUNCTION() local
371 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
390 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
730 zend_string *ciphertext; in PHP_FUNCTION() local
761 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_MACBYTES, 0); in PHP_FUNCTION()
762 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
765 zend_string_efree(ciphertext); in PHP_FUNCTION()
769 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION() local
771 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
777 unsigned char *ciphertext; in PHP_FUNCTION() local
787 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
807 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
820 zend_string *ciphertext; in PHP_FUNCTION() local
840 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_SEALBYTES, 0); in PHP_FUNCTION()
841 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
843 zend_string_efree(ciphertext); in PHP_FUNCTION()
847 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION() local
849 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
855 unsigned char *ciphertext; in PHP_FUNCTION() local
863 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
878 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1211 zend_string *ciphertext; in PHP_FUNCTION() local
1237 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1238 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1240 zend_string_efree(ciphertext); in PHP_FUNCTION()
1244 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1246 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1251 zend_string *ciphertext; in PHP_FUNCTION() local
1276 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1277 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1279 zend_string_efree(ciphertext); in PHP_FUNCTION()
1283 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1285 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1291 zend_string *ciphertext; in PHP_FUNCTION() local
1317 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1318 if (crypto_stream_xchacha20((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1320 zend_string_free(ciphertext); in PHP_FUNCTION()
1324 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1326 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1331 zend_string *ciphertext; in PHP_FUNCTION() local
1356 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1357 if (crypto_stream_xchacha20_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1359 zend_string_free(ciphertext); in PHP_FUNCTION()
1363 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1365 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1370 zend_string *ciphertext; in PHP_FUNCTION() local
1398 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1399 if (crypto_stream_xchacha20_xor_ic((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1402 zend_string_free(ciphertext); in PHP_FUNCTION()
1406 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1408 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1749 zend_string *ciphertext; in PHP_FUNCTION() local
1786 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1788 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1791 zend_string_efree(ciphertext); in PHP_FUNCTION()
1797 zend_string_efree(ciphertext); in PHP_FUNCTION()
1801 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1802 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1804 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1811 unsigned char *ciphertext; in PHP_FUNCTION() local
1822 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1852 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()
1987 zend_string *ciphertext; in PHP_FUNCTION() local
2020 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2022 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2025 zend_string_efree(ciphertext); in PHP_FUNCTION()
2031 zend_string_efree(ciphertext); in PHP_FUNCTION()
2035 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2036 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2038 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2045 unsigned char *ciphertext; in PHP_FUNCTION() local
2056 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2082 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2101 zend_string *ciphertext; in PHP_FUNCTION() local
2134 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2136 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2139 zend_string_efree(ciphertext); in PHP_FUNCTION()
2145 zend_string_efree(ciphertext); in PHP_FUNCTION()
2149 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2150 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2152 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2159 unsigned char *ciphertext; in PHP_FUNCTION() local
2170 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2196 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2214 zend_string *ciphertext; in PHP_FUNCTION() local
2251 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2253 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2256 zend_string_efree(ciphertext); in PHP_FUNCTION()
2262 zend_string_efree(ciphertext); in PHP_FUNCTION()
2266 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2267 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2269 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2276 unsigned char *ciphertext; in PHP_FUNCTION() local
2287 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2318 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2337 zend_string *ciphertext; in PHP_FUNCTION() local
2370 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2372 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2375 zend_string_efree(ciphertext); in PHP_FUNCTION()
2381 zend_string_efree(ciphertext); in PHP_FUNCTION()
2385 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2386 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2388 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2395 unsigned char *ciphertext; in PHP_FUNCTION() local
2406 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2437 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()