Tweet, Share & Like [ EnAcCiOn ]

 

FeedBurner FeedCount Y Facebook | EnAcCiOn

Send Voicemail | EnAcCiOn

Contact me using vCita | EnAcCiOn

Contact me using vCita | EnAcCiOn

Meeting Scheduler Powered by vCita

lunes, 17 de agosto de 2015

Re: Generating stoken in PHP

Good morning, I managed to solve the insurance problem by modifying a little token my code:         $siteSecret = "{MY_KEY_SITE_SECRET}";        $key = substr(sha1($siteSecret, true), 0, 16);        $plaintext = json_encode(array(            'session_id' => ZFKiller_String::makeRandString(16),            'ts_ms' => round(microtime(true) * 1000),        ));        $pad = 16 - (strlen($plaintext) % 16);        $plaintext .= str_repeat(chr($pad), $pad);        $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_ECB);        $secureToken = rtrim(strtr(base64_encode($ciphertext), '+/', '-_'), '='); I used this as a base class that slushie created: http://bit.ly/1hkXaCL -- You received this message because you are subscribed to the Google Groups "reCAPTCHA" group. To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+unsubscribe@googlegroups.com. To post to this group, send email to recaptcha@googlegroups.com. Visit this group at http://bit.ly/1dkFnYd. For more options, visit http://bit.ly/P65DvS.

No hay comentarios:

EnAcCiOn

Contador Web | EnAcCiOn

EnAcCiOn

EnAcCiOn

EnAcCiOn

Blog Archive | EnAcCiOn