Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6164891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:04:16+00:00 2026-05-23T22:04:16+00:00

I am trying to generate a unique token for every user on my site.

  • 0

I am trying to generate a unique token for every user on my site. The token is generated when the user registers, and will ideally be as secure as possble. What is the best method of doing so to allow me to display the token to the user?

This token is NOT a password, and the user is not going to create it themselves. If I hash and salt it upon registration, I will not be able to retrieve it obviously, because it’s hashed and salted. I want a simple way to do so via PHP and be able to display it to the user easily.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:04:17+00:00Added an answer on May 23, 2026 at 10:04 pm

    Hashes are one-way so the only way to reverse a hash is to store the original value making the hash redundant.

    If you only need to display the value once, then store the value into a variable, print it on the page, and don’t save it, that’s secure for you.

    Another option is to just use database encryption to store the token, then decrypt before displaying to the user. Assuming you use MySQL you might find this helpul: MySQL Encryption

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to generate a unique ID in php in order to store user-uploaded
I am trying to integrate a method to add a hash token to every
I'm trying to generate a unique dosieid number for my web site. My web
I am trying to understand crc32 to generate the unique url for web page.
I'm trying (as a self-learning exercise) to create a Clojure macro that will generate
Im trying to generate n unique random numbers between 1 and max I tried
I'm trying to generate a list of events that a user is attending. All
I'm trying to set an unique constraint on the column LoginName of table User.
I am trying to generate a unique identifier of a fixed length such as
i'm trying to generate a unique id using this code: $RCode = md5(uniqid(rand(), true));

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.