מדריך PHP
קודם
הבא
דוגמה 1.
?php $key = "this is a very secret key"; $input = "Let us meet at 9 o'clock at the secret place ."; $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);?
דוגמה 2.
?php $key = "this is a very secret key"; $input = "Let us meet at 9 o'clock at the secret place ."; $td = mcrypt_module_open ('tripledes', '', 'ecb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, $key, $iv); $encrypted_data = mcrypt_generic ($td, $input); mcrypt_generic_end ($td);?
To use it, download libmcrypt-x.x.tar.gz from here To use it, download libmcrypt-x.x.tar.gz from here and follow the included installation instructions.
You need to compile PHP with the --with-mcrypt parameter to enable this extension.
This extension does not define any resource types.
קודם
ראשי
הבא
למעלה