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

Thread: Is my PHP code secure?

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2014

    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));

    Last edited by bestellen; October 19th, 2015 at 05:37 PM.

Similar Threads

  1. How to Code a Secure Society
    By zencoder in forum Cosmos
    Replies: 0
    Last Post: February 1st, 2006, 09:16 PM
  2. secure code
    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