-
May 29th, 2014, 09:41 PM
#1
Junior Member
Is my PHP code secure?
I'm using PHP and want to make an encryption method for storing a random value in the user's cookie as a method of authentication so they don't need to log back in every time they visit the site. Would the code below be secure?
$salt = "some random characters I made up";
hash('sha256', $salt.microtime(true).mt_rand(10000000,99999999));
Thanks!
Last edited by bestellen; October 19th, 2015 at 04:37 PM.
-
May 30th, 2014, 10:12 AM
#2
You should ask this question on our sister site:
http://board.phpbuilder.com/forum.php
Similar Threads
-
By zencoder in forum Cosmos
Replies: 0
Last Post: February 1st, 2006, 09:16 PM
-
By dieterle81 in forum Programming Security
Replies: 1
Last Post: March 7th, 2002, 02:00 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|