Lines Matching refs:pm
375 php_mcrypt *pm; \
379 ZEND_FETCH_RESOURCE (pm, php_mcrypt *, &mcryptind, -1, "MCrypt", le_mcrypt);
397 if (!pm->init) { \
409 php_mcrypt *pm = (php_mcrypt *) rsrc->ptr; in PHP_INI_BEGIN() local
410 if (pm) { in PHP_INI_BEGIN()
411 mcrypt_generic_deinit(pm->td); in PHP_INI_BEGIN()
412 mcrypt_module_close(pm->td); in PHP_INI_BEGIN()
413 efree(pm); in PHP_INI_BEGIN()
414 pm = NULL; in PHP_INI_BEGIN()
554 php_mcrypt *pm; in PHP_FUNCTION() local
573 pm = emalloc(sizeof(php_mcrypt)); in PHP_FUNCTION()
574 pm->td = td; in PHP_FUNCTION()
575 pm->init = 0; in PHP_FUNCTION()
576 ZEND_REGISTER_RESOURCE(return_value, pm, le_mcrypt); in PHP_FUNCTION()
590 php_mcrypt *pm; in PHP_FUNCTION() local
597 ZEND_FETCH_RESOURCE(pm, php_mcrypt *, &mcryptind, -1, "MCrypt", le_mcrypt); in PHP_FUNCTION()
599 max_key_size = mcrypt_enc_get_key_size(pm->td); in PHP_FUNCTION()
600 iv_size = mcrypt_enc_get_iv_size(pm->td); in PHP_FUNCTION()
625 mcrypt_generic_deinit(pm->td); in PHP_FUNCTION()
626 result = mcrypt_generic_init(pm->td, key_s, key_size, iv_s); in PHP_FUNCTION()
645 pm->init = 1; in PHP_FUNCTION()
660 php_mcrypt *pm; in PHP_FUNCTION() local
668 ZEND_FETCH_RESOURCE(pm, php_mcrypt *, &mcryptind, -1, "MCrypt", le_mcrypt); in PHP_FUNCTION()
677 if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ in PHP_FUNCTION()
678 block_size = mcrypt_enc_get_block_size(pm->td); in PHP_FUNCTION()
690 mcrypt_generic(pm->td, data_s, data_size); in PHP_FUNCTION()
705 php_mcrypt *pm; in PHP_FUNCTION() local
713 ZEND_FETCH_RESOURCE(pm, php_mcrypt * , &mcryptind, -1, "MCrypt", le_mcrypt); in PHP_FUNCTION()
722 if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ in PHP_FUNCTION()
723 block_size = mcrypt_enc_get_block_size(pm->td); in PHP_FUNCTION()
735 mdecrypt_generic(pm->td, data_s, data_size); in PHP_FUNCTION()
752 key_sizes = mcrypt_enc_get_supported_key_sizes(pm->td, &count); in PHP_FUNCTION()
767 RETURN_LONG(mcrypt_enc_self_test(pm->td)); in PHP_FUNCTION()
787 if (mcrypt_generic_deinit(pm->td) < 0) { in PHP_FUNCTION()
791 pm->init = 0; in PHP_FUNCTION()
802 if (mcrypt_enc_is_block_algorithm_mode(pm->td) == 1) { in PHP_FUNCTION()
816 if (mcrypt_enc_is_block_algorithm(pm->td) == 1) { in PHP_FUNCTION()
830 if (mcrypt_enc_is_block_mode(pm->td) == 1) { in PHP_FUNCTION()
843 RETURN_LONG(mcrypt_enc_get_block_size(pm->td)); in PHP_FUNCTION()
852 RETURN_LONG(mcrypt_enc_get_key_size(pm->td)); in PHP_FUNCTION()
861 RETURN_LONG(mcrypt_enc_get_iv_size(pm->td)); in PHP_FUNCTION()
872 name = mcrypt_enc_get_algorithms_name(pm->td); in PHP_FUNCTION()
885 name = mcrypt_enc_get_modes_name(pm->td); in PHP_FUNCTION()