Is my PHP code secure?
Results 1 to 2 of 2

Thread: Is my PHP code secure?

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    10

    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!

  2. #2
    Administrator
    Join Date
    Apr 2011
    Location
    USA
    Posts
    237
    You should ask this question on our sister site:

    http://board.phpbuilder.com/forum.php

Similar Threads

  1. How to Code a Secure Society
    By zencoder in forum Cosmos
    Replies: 0
    Last Post: February 1st, 2006, 08:16 PM
  2. secure code
    By dieterle81 in forum Programming Security
    Replies: 1
    Last Post: March 7th, 2002, 01: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
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides