Lines Matching refs:sodium_exception_ce

33 static zend_class_entry *sodium_exception_ce;  variable
163 sodium_exception_ce = register_class_SodiumException(zend_ce_exception); in PHP_MINIT_FUNCTION()
164 sodium_exception_ce->create_object = sodium_exception_create_object; in PHP_MINIT_FUNCTION()
203 zend_throw_exception(sodium_exception_ce, "a PHP string is required", 0); in PHP_FUNCTION()
229 zend_throw_exception(sodium_exception_ce, "a PHP string is required", 0); in PHP_FUNCTION()
254 zend_throw_exception(sodium_exception_ce, "PHP strings are required", 0); in PHP_FUNCTION()
262 …zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length… in PHP_FUNCTION()
282 …zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length… in PHP_FUNCTION()
303 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SHORTHASH_KEYBYTES bytes long"); in PHP_FUNCTION()
310 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
336 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes long… in PHP_FUNCTION()
340 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes long"); in PHP_FUNCTION()
344 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
352 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
378 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETBOX_NONCEBYTES bytes long… in PHP_FUNCTION()
382 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes long"); in PHP_FUNCTION()
419 zend_throw_exception(sodium_exception_ce, "unsupported output length", 0); in PHP_FUNCTION()
425 zend_throw_exception(sodium_exception_ce, "unsupported key length", 0); in PHP_FUNCTION()
433 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
458 zend_throw_exception(sodium_exception_ce, "unsupported output length", 0); in PHP_FUNCTION()
464 zend_throw_exception(sodium_exception_ce, "unsupported key length", 0); in PHP_FUNCTION()
470 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
497 zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); in PHP_FUNCTION()
504 zend_throw_exception(sodium_exception_ce, "incorrect state length", 0); in PHP_FUNCTION()
511 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
536 zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); in PHP_FUNCTION()
543 zend_throw_exception(sodium_exception_ce, "incorrect state length", 0); in PHP_FUNCTION()
548 zend_throw_exception(sodium_exception_ce, "unsupported output length", 0); in PHP_FUNCTION()
558 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
583 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
604 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SEEDBYTES bytes long"); in PHP_FUNCTION()
614 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
638 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes long"); in PHP_FUNCTION()
642 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes long"); in PHP_FUNCTION()
668 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
691 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
714 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_BOX_SECRETKEYBYTES bytes long"); in PHP_FUNCTION()
748 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_NONCEBYTES bytes long"); in PHP_FUNCTION()
752 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
758 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
766 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
794 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_NONCEBYTES bytes long"); in PHP_FUNCTION()
798 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
833 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_PUBLICKEYBYTES bytes long"); in PHP_FUNCTION()
837 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
844 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
869 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_BOX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
903 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
924 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SEEDBYTES bytes long"); in PHP_FUNCTION()
934 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
958 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"… in PHP_FUNCTION()
962 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"… in PHP_FUNCTION()
987 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"… in PHP_FUNCTION()
995 zend_throw_exception(sodium_exception_ce, in PHP_FUNCTION()
1017 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
1040 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
1068 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"… in PHP_FUNCTION()
1072 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1081 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1086 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1112 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"… in PHP_FUNCTION()
1117 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1129 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1154 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"… in PHP_FUNCTION()
1163 zend_throw_exception(sodium_exception_ce, "signature creation failed", 0); in PHP_FUNCTION()
1168 zend_throw_exception(sodium_exception_ce, "signature has a bogus size", 0); in PHP_FUNCTION()
1194 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_BYTES bytes long"); in PHP_FUNCTION()
1198 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"… in PHP_FUNCTION()
1226 zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); in PHP_FUNCTION()
1230 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes long"); in PHP_FUNCTION()
1234 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_KEYBYTES bytes long"); in PHP_FUNCTION()
1241 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1268 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_NONCEBYTES bytes long"); in PHP_FUNCTION()
1272 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_KEYBYTES bytes long"); in PHP_FUNCTION()
1280 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1306 zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); in PHP_FUNCTION()
1310 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES byt… in PHP_FUNCTION()
1314 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes… in PHP_FUNCTION()
1321 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1348 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES byt… in PHP_FUNCTION()
1352 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes… in PHP_FUNCTION()
1360 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1390 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES byt… in PHP_FUNCTION()
1394 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes… in PHP_FUNCTION()
1403 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1436 zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); in PHP_FUNCTION()
1440 zend_argument_error(sodium_exception_ce, 1, "is too large"); in PHP_FUNCTION()
1444 zend_argument_error(sodium_exception_ce, 2, "is too long"); in PHP_FUNCTION()
1448 zend_argument_error(sodium_exception_ce, 4, "must be greater than 0"); in PHP_FUNCTION()
1452 zend_argument_error(sodium_exception_ce, 5, "must be greater than 0"); in PHP_FUNCTION()
1460 zend_throw_exception(sodium_exception_ce, "unsupported password hashing algorithm", 0); in PHP_FUNCTION()
1467 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_PWHASH_SALTBYTES bytes long"); in PHP_FUNCTION()
1471 …zend_argument_error(sodium_exception_ce, 4, "must be greater than or equal to %d", crypto_pwhash_O… in PHP_FUNCTION()
1475 …zend_argument_error(sodium_exception_ce, 5, "must be greater than or equal to %d", crypto_pwhash_M… in PHP_FUNCTION()
1495 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1519 zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); in PHP_FUNCTION()
1523 zend_argument_error(sodium_exception_ce, 3, "must be greater than 0"); in PHP_FUNCTION()
1527 zend_argument_error(sodium_exception_ce, 1, "is too long"); in PHP_FUNCTION()
1534 …zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to %d", crypto_pwhash_O… in PHP_FUNCTION()
1537 …zend_argument_error(sodium_exception_ce, 3, "must be greater than or equal to %d", crypto_pwhash_M… in PHP_FUNCTION()
1544 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1588 zend_argument_error(sodium_exception_ce, 2, "is too long"); in PHP_FUNCTION()
1623 zend_argument_error(sodium_exception_ce, 1, "must be greater than 0"); in PHP_FUNCTION()
1627 zend_argument_error(sodium_exception_ce, 4, "must be greater than 0"); in PHP_FUNCTION()
1631 zend_argument_error(sodium_exception_ce, 5, "must be greater than 0"); in PHP_FUNCTION()
1638 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SAL… in PHP_FUNCTION()
1642 …zend_argument_error(sodium_exception_ce, 4, "must be greater than or equal to %d", crypto_pwhash_s… in PHP_FUNCTION()
1645 …zend_argument_error(sodium_exception_ce, 5, "must be greater than or equal to %d", crypto_pwhash_s… in PHP_FUNCTION()
1653 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1676 zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); in PHP_FUNCTION()
1680 zend_argument_error(sodium_exception_ce, 3, "must be greater than 0"); in PHP_FUNCTION()
1687 …zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to %d", crypto_pwhash_s… in PHP_FUNCTION()
1690 …zend_argument_error(sodium_exception_ce, 3, "must be greater than or equal to %d", crypto_pwhash_s… in PHP_FUNCTION()
1698 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1770 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes … in PHP_FUNCTION()
1774 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes l… in PHP_FUNCTION()
1778 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1782 zend_throw_exception(sodium_exception_ce, "message too long for a single key", 0); in PHP_FUNCTION()
1792 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1798 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1830 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES bytes … in PHP_FUNCTION()
1834 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES bytes l… in PHP_FUNCTION()
1841 zend_argument_error(sodium_exception_ce, 1, "is too long"); in PHP_FUNCTION()
1846 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1859 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1893 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes … in PHP_FUNCTION()
1897 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes l… in PHP_FUNCTION()
1901 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1911 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
1917 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1949 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes … in PHP_FUNCTION()
1953 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes l… in PHP_FUNCTION()
1961 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
1974 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2008 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes l… in PHP_FUNCTION()
2012 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES bytes lo… in PHP_FUNCTION()
2016 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2026 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2032 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2064 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes l… in PHP_FUNCTION()
2068 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES bytes lo… in PHP_FUNCTION()
2076 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2089 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2122 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES… in PHP_FUNCTION()
2126 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES … in PHP_FUNCTION()
2130 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2140 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2146 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2178 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES… in PHP_FUNCTION()
2182 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES … in PHP_FUNCTION()
2190 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2203 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2235 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUB… in PHP_FUNCTION()
2239 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYB… in PHP_FUNCTION()
2243 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2247 zend_throw_exception(sodium_exception_ce, "message too long for a single key", 0); in PHP_FUNCTION()
2257 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2263 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2295 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUB… in PHP_FUNCTION()
2299 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYB… in PHP_FUNCTION()
2304 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2312 zend_throw_exception(sodium_exception_ce, "message too long for a single key", 0); in PHP_FUNCTION()
2325 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2358 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPU… in PHP_FUNCTION()
2362 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEY… in PHP_FUNCTION()
2366 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2376 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2382 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2414 …zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPU… in PHP_FUNCTION()
2418 …zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEY… in PHP_FUNCTION()
2426 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2431 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2444 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2467 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2501 zend_argument_error(sodium_exception_ce, 1, "must be a valid hexadecimal string"); in PHP_FUNCTION()
2506 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2530 zend_argument_error(sodium_exception_ce, 2, "must be a valid base64 variant identifier"); in PHP_FUNCTION()
2534 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2563 zend_argument_error(sodium_exception_ce, 2, "must be a valid base64 variant identifier"); in PHP_FUNCTION()
2573 zend_argument_error(sodium_exception_ce, 1, "must be a valid base64 string"); in PHP_FUNCTION()
2578 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
2602 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES bytes lo… in PHP_FUNCTION()
2606 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES bytes lo… in PHP_FUNCTION()
2612 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2635 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
2640 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
2647 zend_throw_exception(sodium_exception_ce, "Result is identity element", 0); in PHP_FUNCTION()
2667 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
2674 zend_argument_error(sodium_exception_ce, 1, "must not be zero", 0); in PHP_FUNCTION()
2697 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_SEEDBYTES bytes long"); in PHP_FUNCTION()
2709 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2731 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2751 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
2774 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
2804 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
2808 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes long"); in PHP_FUNCTION()
2816 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2854 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes long"); in PHP_FUNCTION()
2858 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes long"); in PHP_FUNCTION()
2866 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2900 zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes long"); in PHP_FUNCTION()
2908 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
2933 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_AUTH_KEYBYTES bytes long"); in PHP_FUNCTION()
2937 zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_AUTH_BYTES bytes long"); in PHP_FUNCTION()
2960 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes long"… in PHP_FUNCTION()
2968 zend_throw_exception(sodium_exception_ce, "conversion failed", 0); in PHP_FUNCTION()
2988 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes long"… in PHP_FUNCTION()
2996 zend_throw_exception(sodium_exception_ce, "conversion failed", 0); in PHP_FUNCTION()
3018 …zend_argument_error(sodium_exception_ce, 1, "and argument #2 ($string_2) must have the same length… in PHP_FUNCTION()
3201 …zend_argument_error(sodium_exception_ce, 1, "must be greater than or equal to SODIUM_CRYPTO_KDF_BY… in PHP_FUNCTION()
3205 …zend_argument_error(sodium_exception_ce, 1, "must be less than or equal to SODIUM_CRYPTO_KDF_BYTES… in PHP_FUNCTION()
3209 zend_argument_error(sodium_exception_ce, 2, "must be greater than or equal to 0"); in PHP_FUNCTION()
3213 zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_KDF_CONTEXTBYTES bytes long"); in PHP_FUNCTION()
3217 zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_KDF_BYTES_MIN bytes long"); in PHP_FUNCTION()
3266 zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); in PHP_FUNCTION()
3270 zend_argument_error(sodium_exception_ce, 2, "is too large"); in PHP_FUNCTION()
3280 zend_throw_exception(sodium_exception_ce, "input is too large", 0); in PHP_FUNCTION()
3301 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3340 zend_argument_error(sodium_exception_ce, 2, "must be greater than 0"); in PHP_FUNCTION()
3344 zend_argument_error(sodium_exception_ce, 2, "is too large"); in PHP_FUNCTION()
3348 zend_argument_error(sodium_exception_ce, 1, "must be at least as long as the block size"); in PHP_FUNCTION()
3380 zend_throw_exception(sodium_exception_ce, "invalid padding", 0); in PHP_FUNCTION()
3414 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_… in PHP_FUNCTION()
3419 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3449 zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); in PHP_FUNCTION()
3456 zend_argument_error(sodium_exception_ce, 1, "must have a correct length"); in PHP_FUNCTION()
3461 …zend_argument_error(sodium_exception_ce, 2, "must be at most SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20P… in PHP_FUNCTION()
3465 zend_argument_error(sodium_exception_ce, 4, "must be in the range of 0-255"); in PHP_FUNCTION()
3475 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3480 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
3504 …zend_argument_error(sodium_exception_ce, 1, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_… in PHP_FUNCTION()
3508 …zend_argument_error(sodium_exception_ce, 2, "must be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_… in PHP_FUNCTION()
3513 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3541 zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); in PHP_FUNCTION()
3548 zend_throw_exception(sodium_exception_ce, "incorrect state length", 0); in PHP_FUNCTION()
3564 zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0); in PHP_FUNCTION()
3586 zend_argument_error(sodium_exception_ce, 1, "must be a reference to a state"); in PHP_FUNCTION()
3593 zend_throw_exception(sodium_exception_ce, "incorrect state length", 0); in PHP_FUNCTION()
3615 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3620 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
3627 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3646 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3653 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3671 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3705 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3710 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
3732 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3754 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3761 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()
3782 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3787 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
3809 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3844 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3868 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3873 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
3897 zend_argument_error(sodium_exception_ce, 1, in PHP_FUNCTION()
3902 zend_argument_error(sodium_exception_ce, 2, in PHP_FUNCTION()
3909 zend_throw_exception(sodium_exception_ce, "internal error", 0); in PHP_FUNCTION()