Lines Matching refs:ciphertext

782 	zend_string   *ciphertext;  in PHP_FUNCTION()  local
813 ciphertext = zend_string_alloc((size_t) msg_len + crypto_secretbox_MACBYTES, 0); in PHP_FUNCTION()
814 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
817 zend_string_free(ciphertext); in PHP_FUNCTION()
821 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION() local
823 RETURN_STR(ciphertext); in PHP_FUNCTION()
830 unsigned char *ciphertext; in PHP_FUNCTION() local
837 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
860 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1212 zend_string *ciphertext; in PHP_FUNCTION() local
1247 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_MACBYTES, 0); in PHP_FUNCTION()
1248 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1251 zend_string_free(ciphertext); in PHP_FUNCTION()
1255 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION() local
1257 RETURN_STR(ciphertext); in PHP_FUNCTION()
1263 unsigned char *ciphertext; in PHP_FUNCTION() local
1273 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1297 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1310 zend_string *ciphertext; in PHP_FUNCTION() local
1332 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_SEALBYTES, 0); in PHP_FUNCTION()
1333 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1335 zend_string_free(ciphertext); in PHP_FUNCTION()
1339 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION() local
1341 RETURN_STR(ciphertext); in PHP_FUNCTION()
1347 unsigned char *ciphertext; in PHP_FUNCTION() local
1355 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1372 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1726 zend_string *ciphertext; in PHP_FUNCTION() local
1752 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1753 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1755 zend_string_free(ciphertext); in PHP_FUNCTION()
1759 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1761 RETURN_STR(ciphertext); in PHP_FUNCTION()
1766 zend_string *ciphertext; in PHP_FUNCTION() local
1791 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1792 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1794 zend_string_free(ciphertext); in PHP_FUNCTION()
1798 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1800 RETURN_STR(ciphertext); in PHP_FUNCTION()
2148 zend_string *ciphertext; in PHP_FUNCTION() local
2191 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2193 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2196 zend_string_free(ciphertext); in PHP_FUNCTION()
2202 zend_string_free(ciphertext); in PHP_FUNCTION()
2206 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2207 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2209 RETURN_STR(ciphertext); in PHP_FUNCTION()
2216 unsigned char *ciphertext; in PHP_FUNCTION() local
2227 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2263 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2282 zend_string *ciphertext; in PHP_FUNCTION() local
2321 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2323 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2326 zend_string_free(ciphertext); in PHP_FUNCTION()
2332 zend_string_free(ciphertext); in PHP_FUNCTION()
2336 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2337 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2339 RETURN_STR(ciphertext); in PHP_FUNCTION()
2346 unsigned char *ciphertext; in PHP_FUNCTION() local
2357 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2389 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2407 zend_string *ciphertext; in PHP_FUNCTION() local
2450 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2452 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2455 zend_string_free(ciphertext); in PHP_FUNCTION()
2461 zend_string_free(ciphertext); in PHP_FUNCTION()
2465 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2466 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2468 RETURN_STR(ciphertext); in PHP_FUNCTION()
2475 unsigned char *ciphertext; in PHP_FUNCTION() local
2486 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2523 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2542 zend_string *ciphertext; in PHP_FUNCTION() local
2581 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2583 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2586 zend_string_free(ciphertext); in PHP_FUNCTION()
2592 zend_string_free(ciphertext); in PHP_FUNCTION()
2596 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2597 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2599 RETURN_STR(ciphertext); in PHP_FUNCTION()
2606 unsigned char *ciphertext; in PHP_FUNCTION() local
2617 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2654 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()