note 71486 deleted from function.mcrypt-encrypt by nikic

From: Date: Sat, 09 Nov 2013 11:12:01 +0000
Subject: note 71486 deleted from function.mcrypt-encrypt by nikic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197474@lists.php.net to get a copy of this message
Note Submitter: davidwhthomas at gmail ---- I forgot to add the sample usage for encrypting and decrypting cookies: Set encrypted cookie: <?php $time = time()+60*60*24*30*12; //store cookie for one year setcookie('cookie_name', encryptCookie('cookie_value'),$time,'/'); ?> Get encrypted cookie value: <?php $cookie_value = decryptCookie($_COOKIE['cookie_name']); ?> hope it helps.

« previous php.notes (#197474) next »