国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? PHP ???? PHP? ??? ? ???? DES? ?????.

PHP? ??? ? ???? DES? ?????.

Jul 25, 2016 am 08:43 AM

php中有一個擴展可以支持DES的加密算法,是:extension=php_mcrypt.dll

在配置文件中將這個擴展打開還不能夠在windows環(huán)境下使用

需要將PHP文件夾下的 libmcrypt.dll 拷貝到系統(tǒng)的 system32 目錄下,這是通過phpinfo可以查看到mcrypt表示這個模塊可以正常試用了。

下面是PHP中使用DES加密解密的一個例子:

  1. //$input - stuff to decrypt
  2. //$key - the secret key to use
  3. function do_mencrypt($input, $key)
  4. {
  5. $input = str_replace(""n", "", $input);
  6. $input = str_replace(""t", "", $input);
  7. $input = str_replace(""r", "", $input);
  8. $key = substr(md5($key), 0, 24);
  9. $td = mcrypt_module_open('tripledes', '', 'ecb', '');
  10. $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
  11. mcrypt_generic_init($td, $key, $iv);
  12. $encrypted_data = mcrypt_generic($td, $input);
  13. mcrypt_generic_deinit($td);
  14. mcrypt_module_close($td);
  15. return trim(chop(base64_encode($encrypted_data)));
  16. }
  17. //$input - stuff to decrypt
  18. //$key - the secret key to use
  19. function do_mdecrypt($input, $key)
  20. {
  21. $input = str_replace(""n", "", $input);
  22. $input = str_replace(""t", "", $input);
  23. $input = str_replace(""r", "", $input);
  24. $input = trim(chop(base64_decode($input)));
  25. $td = mcrypt_module_open('tripledes', '', 'ecb', '');
  26. $key = substr(md5($key), 0, 24);
  27. $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
  28. mcrypt_generic_init($td, $key, $iv);
  29. $decrypted_data = mdecrypt_generic($td, $input);
  30. mcrypt_generic_deinit($td);
  31. mcrypt_module_close($td);
  32. return trim(chop($decrypted_data));
  33. }
復(fù)制代碼

PHP, DES


? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
PHP ?? ??? ??????? PHP ?? ??? ??????? Jul 17, 2025 am 04:16 AM

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP?? ?? ???? ???? ???? ??? ?????? PHP?? ?? ???? ???? ???? ??? ?????? Jul 08, 2025 am 02:37 AM

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP?? ?? ?? PHP?? ?? ?? Jul 18, 2025 am 04:57 AM

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP?? ???? ??? ?????? PHP?? ???? ??? ?????? Jul 11, 2025 am 03:12 AM

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ?? ?? ? PHP ?? ?? ? Jul 18, 2025 am 04:51 AM

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

?? PHP : ??? ??? ?? PHP : ??? ??? Jul 18, 2025 am 04:54 AM

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP?? ??? ? ???? ??? ????? ?? PHP?? ??? ? ???? ??? ????? ?? Jul 12, 2025 am 03:15 AM

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

?? PHP ?? ??? ?? PHP ?? ??? Jul 18, 2025 am 04:52 AM

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

See all articles