Lines Matching refs:ciphertext

504 	zend_string   *ciphertext;  in PHP_FUNCTION()  local
531 ciphertext = zend_string_alloc((size_t) msg_len + crypto_secretbox_MACBYTES, 0); in PHP_FUNCTION()
532 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
535 zend_string_efree(ciphertext); in PHP_FUNCTION()
539 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION() local
541 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
548 unsigned char *ciphertext; in PHP_FUNCTION() local
555 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
574 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
914 zend_string *ciphertext; in PHP_FUNCTION() local
945 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_MACBYTES, 0); in PHP_FUNCTION()
946 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
949 zend_string_efree(ciphertext); in PHP_FUNCTION()
953 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION() local
955 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
961 unsigned char *ciphertext; in PHP_FUNCTION() local
971 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
991 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1004 zend_string *ciphertext; in PHP_FUNCTION() local
1024 ciphertext = zend_string_alloc((size_t) msg_len + crypto_box_SEALBYTES, 0); in PHP_FUNCTION()
1025 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1027 zend_string_efree(ciphertext); in PHP_FUNCTION()
1031 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION() local
1033 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1039 unsigned char *ciphertext; in PHP_FUNCTION() local
1047 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1062 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1394 zend_string *ciphertext; in PHP_FUNCTION() local
1420 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1421 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1423 zend_string_efree(ciphertext); in PHP_FUNCTION()
1427 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1429 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1434 zend_string *ciphertext; in PHP_FUNCTION() local
1459 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1460 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1462 zend_string_efree(ciphertext); in PHP_FUNCTION()
1466 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION() local
1468 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1808 zend_string *ciphertext; in PHP_FUNCTION() local
1845 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1847 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1850 zend_string_efree(ciphertext); in PHP_FUNCTION()
1856 zend_string_efree(ciphertext); in PHP_FUNCTION()
1860 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1861 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1863 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1870 unsigned char *ciphertext; in PHP_FUNCTION() local
1881 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
1911 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
1930 zend_string *ciphertext; in PHP_FUNCTION() local
1963 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
1965 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
1968 zend_string_efree(ciphertext); in PHP_FUNCTION()
1974 zend_string_efree(ciphertext); in PHP_FUNCTION()
1978 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
1979 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
1981 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
1988 unsigned char *ciphertext; in PHP_FUNCTION() local
1999 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2025 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2043 zend_string *ciphertext; in PHP_FUNCTION() local
2080 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2082 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2085 zend_string_efree(ciphertext); in PHP_FUNCTION()
2091 zend_string_efree(ciphertext); in PHP_FUNCTION()
2095 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2096 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2098 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2105 unsigned char *ciphertext; in PHP_FUNCTION() local
2116 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2147 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()
2166 zend_string *ciphertext; in PHP_FUNCTION() local
2199 ciphertext = zend_string_alloc((size_t) ciphertext_len, 0); in PHP_FUNCTION()
2201 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2204 zend_string_efree(ciphertext); in PHP_FUNCTION()
2210 zend_string_efree(ciphertext); in PHP_FUNCTION()
2214 PHP_SODIUM_ZSTR_TRUNCATE(ciphertext, (size_t) ciphertext_real_len); in PHP_FUNCTION()
2215 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION() local
2217 RETURN_NEW_STR(ciphertext); in PHP_FUNCTION()
2224 unsigned char *ciphertext; in PHP_FUNCTION() local
2235 &ciphertext, &ciphertext_len, in PHP_FUNCTION()
2266 ciphertext, (unsigned long long) ciphertext_len, in PHP_FUNCTION()