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

viernes, 14 de agosto de 2015

Re: Generating stoken in PHP

I am also having trouble generating a secure token.The error is the same "Error: invalid Stoken".I am using the following code:         $siteSecret = "MY_KEY_SITE_SECRET";        $key = substr(sha1($siteSecret), 0, 16);        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);        $plaintext = json_encode(array(            'session_id' => ZFKiller_String::makeRandString(16),            'ts_ms' => round(microtime(true) * 1000),        ));        $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);        $secureToken = rtrim(strtr(base64_encode($ciphertext), '+/', '-_'), '='); I've tried to resolve following the response of the slushie to this question, but still not resolved: http://bit.ly/1NvuFMV successful? -- 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