Lines Matching refs:ciphertext
535 zend_string *ciphertext; in PHP_FUNCTION() local
562 ciphertext = zend_string_alloc((size_t) msg_len + crypto_secretbox_MACBYTES, 0); in PHP_FUNCTION()
563 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
566 zend_string_efree(ciphertext); in PHP_FUNCTION()
570 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION() local
572 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
579 unsigned char *ciphertext; in PHP_FUNCTION() local
586 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
605 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
945 zend_string *ciphertext; in PHP_FUNCTION() local
976 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_MACBYTES, 0); in PHP_FUNCTION()
977 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
980 zend_string_efree(ciphertext); in PHP_FUNCTION()
984 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION() local
986 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
992 unsigned char *ciphertext; in PHP_FUNCTION() local
1002 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1022 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1035 zend_string *ciphertext; in PHP_FUNCTION() local
1055 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_SEALBYTES, 0); in PHP_FUNCTION()
1056 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1058 zend_string_efree(ciphertext); in PHP_FUNCTION()
1062 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION() local
1064 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1070 unsigned char *ciphertext; in PHP_FUNCTION() local
1078 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1093 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1425 zend_string *ciphertext; in PHP_FUNCTION() local
1451 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1452 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1454 zend_string_efree(ciphertext); in PHP_FUNCTION()
1458 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1460 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1465 zend_string *ciphertext; in PHP_FUNCTION() local
1490 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1491 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1493 zend_string_efree(ciphertext); in PHP_FUNCTION()
1497 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1499 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1505 zend_string *ciphertext; in PHP_FUNCTION() local
1531 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1532 if (crypto_stream_xchacha20((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1534 zend_string_free(ciphertext); in PHP_FUNCTION()
1538 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1540 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1545 zend_string *ciphertext; in PHP_FUNCTION() local
1570 ciphertext = zend_string_checked_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1571 if (crypto_stream_xchacha20_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1573 zend_string_free(ciphertext); in PHP_FUNCTION()
1577 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1579 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1920 zend_string *ciphertext; in PHP_FUNCTION() local
1957 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1959 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1962 zend_string_efree(ciphertext); in PHP_FUNCTION()
1968 zend_string_efree(ciphertext); in PHP_FUNCTION()
1972 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1973 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1975 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1982 unsigned char *ciphertext; in PHP_FUNCTION() local
1993 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2023 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2042 zend_string *ciphertext; in PHP_FUNCTION() local
2075 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2077 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2080 zend_string_efree(ciphertext); in PHP_FUNCTION()
2086 zend_string_efree(ciphertext); in PHP_FUNCTION()
2090 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2091 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2093 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2100 unsigned char *ciphertext; in PHP_FUNCTION() local
2111 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2137 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2155 zend_string *ciphertext; in PHP_FUNCTION() local
2192 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2194 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2197 zend_string_efree(ciphertext); in PHP_FUNCTION()
2203 zend_string_efree(ciphertext); in PHP_FUNCTION()
2207 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2208 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2210 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2217 unsigned char *ciphertext; in PHP_FUNCTION() local
2228 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2259 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2278 zend_string *ciphertext; in PHP_FUNCTION() local
2311 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2313 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2316 zend_string_efree(ciphertext); in PHP_FUNCTION()
2322 zend_string_efree(ciphertext); in PHP_FUNCTION()
2326 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2327 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2329 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2336 unsigned char *ciphertext; in PHP_FUNCTION() local
2347 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2378 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()