Code of a PHP encrypted decryption

xiaoxiao2021-03-06  35

Function Keyed ($ txt, $ encrypt_key) {$ encrypt_key = md5 ($ encrypt_key); $ CTR = 0; $ TMP = ""; for ($ I = 0; $ I

Function Encrypt ($ txt, $ key) {srand ((Double) microtime () * 1000000); $ encrypt_key = md5 (rand (0,32000)); $ CTR = 0; $ TMP = ""; for ($ I = 0; $ i

Function Decrypt ($ txt = key) {$ txt = keyed ($ txt, $ key); $ TMP = ""; for ($ I = 0; $ i

$ String = "Hello World !!!";

// Encrypt $ String, And Store IT IN $ ENC_TEXT $ ENC_TEXT = Encrypt ($ String, $ Kee);

// Decrypt the Encrypted Text $ enc_text, and store it in $ dec_text $ dec_text = Decrypt ($ enc_text, $ key);

Print "ORIGINAL TEXT: $ String
"; Print "Encrypted text: $ enc_text
"; Print "Decrypted text: $ dec_text
;?>

转载请注明原文地址:https://www.9cbs.com/read-71719.html

New Post(0)