Lines Matching refs:pm

308 	php_mcrypt *pm;													\
312 if ((pm = (php_mcrypt *)zend_fetch_resource(Z_RES_P(mcryptind), "MCrypt", le_mcrypt)) == NULL) { \
332 if (!pm->init) { \
344 php_mcrypt *pm = (php_mcrypt *) rsrc->ptr; in PHP_INI_END() local
345 if (pm) { in PHP_INI_END()
346 mcrypt_generic_deinit(pm->td); in PHP_INI_END()
347 mcrypt_module_close(pm->td); in PHP_INI_END()
348 efree(pm); in PHP_INI_END()
349 pm = NULL; in PHP_INI_END()
506 php_mcrypt *pm; in PHP_FUNCTION() local
525 pm = emalloc(sizeof(php_mcrypt)); in PHP_FUNCTION()
526 pm->td = td; in PHP_FUNCTION()
527 pm->init = 0; in PHP_FUNCTION()
528 RETURN_RES(zend_register_resource(pm, le_mcrypt)); in PHP_FUNCTION()
542 php_mcrypt *pm; in PHP_FUNCTION() local
549 if ((pm = (php_mcrypt *)zend_fetch_resource(Z_RES_P(mcryptind), "MCrypt", le_mcrypt)) == NULL) { in PHP_FUNCTION()
553 max_key_size = mcrypt_enc_get_key_size(pm->td); in PHP_FUNCTION()
554 iv_size = mcrypt_enc_get_iv_size(pm->td); in PHP_FUNCTION()
575 if (mcrypt_enc_mode_has_iv(pm->td)) { in PHP_FUNCTION()
584 mcrypt_generic_deinit(pm->td); in PHP_FUNCTION()
585 result = mcrypt_generic_init(pm->td, key_s, key_size, iv_s); in PHP_FUNCTION()
604 pm->init = 1; in PHP_FUNCTION()
622 php_mcrypt *pm; in PHP_FUNCTION() local
630 if ((pm = (php_mcrypt *)zend_fetch_resource(Z_RES_P(mcryptind), "MCrypt", le_mcrypt)) == NULL) { in PHP_FUNCTION()
645 if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ in PHP_FUNCTION()
646 block_size = mcrypt_enc_get_block_size(pm->td); in PHP_FUNCTION()
662 mcrypt_generic(pm->td, ZSTR_VAL(data_str), data_size); in PHP_FUNCTION()
676 php_mcrypt *pm; in PHP_FUNCTION() local
684 if ((pm = (php_mcrypt *)zend_fetch_resource(Z_RES_P(mcryptind), "MCrypt", le_mcrypt)) == NULL) { in PHP_FUNCTION()
699 if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ in PHP_FUNCTION()
700 block_size = mcrypt_enc_get_block_size(pm->td); in PHP_FUNCTION()
716 mdecrypt_generic(pm->td, data_s, data_size); in PHP_FUNCTION()
733 key_sizes = mcrypt_enc_get_supported_key_sizes(pm->td, &count); in PHP_FUNCTION()
748 RETURN_LONG(mcrypt_enc_self_test(pm->td)); in PHP_FUNCTION()
768 if (mcrypt_generic_deinit(pm->td) < 0) { in PHP_FUNCTION()
772 pm->init = 0; in PHP_FUNCTION()
783 if (mcrypt_enc_is_block_algorithm_mode(pm->td) == 1) { in PHP_FUNCTION()
797 if (mcrypt_enc_is_block_algorithm(pm->td) == 1) { in PHP_FUNCTION()
811 if (mcrypt_enc_is_block_mode(pm->td) == 1) { in PHP_FUNCTION()
824 RETURN_LONG(mcrypt_enc_get_block_size(pm->td)); in PHP_FUNCTION()
833 RETURN_LONG(mcrypt_enc_get_key_size(pm->td)); in PHP_FUNCTION()
842 RETURN_LONG(mcrypt_enc_get_iv_size(pm->td)); in PHP_FUNCTION()
853 name = mcrypt_enc_get_algorithms_name(pm->td); in PHP_FUNCTION()
866 name = mcrypt_enc_get_modes_name(pm->td); in PHP_FUNCTION()