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 3397896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:35:03+00:00 2026-05-18T04:35:03+00:00

The question I’m about to ask is just because I’m curious. I think I’m

  • 0

The question I’m about to ask is just because I’m curious. I think I’m doing the right thing, but I want to make sure it actually is the right thing. It’s about hashing.

The website I am currently building features several Ajax-ed components. First of all, users that are not logged in cannot use these components. Second, users that are logged in can only do their requests in their own name. It’s pretty easy to forge, because I send User-id’s.

My verification method is as follows. Each user has a column in the database that holds random information, like a 8-character random string. Alongside every Ajax request a user makes, this random string is sent as a hashed string. When the Ajax request is received by the server, this hash is matched with the user table to make sure the ID and hash are a valid couple. If so, the request is valid.

The ‘secret’ random string never enters the user realm and is not easy to be guessed, which means that the hash can never be generated by the user. Is this kind of securing a request safe? Are there any drawbacks? And would it be better if I would use some salt?

On a side note, this kind of verification really interests me. I followed a course in interaction design. ‘We’ have the principle of ‘knowledge in the world and knowledge in the head’. Hashing really uses that technique to transfer meta-data from the ‘head’ to the ‘world’ (and vice versa). Both the head and the world have their methods of comparing and decrypting the meta-data, thus making it impossible to impersonate a request. As long as the world doesn’t know what the head knows.

Well, that said, I’d like to know whether my requests are (relatively) safe. Thanks in advance!

Reinder

  • 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-18T04:35:03+00:00Added an answer on May 18, 2026 at 4:35 am

    Yes subject to a couple caveats.

    1) If the hash is sent in the clear it is subject to spoofing. An attacker who intercepts the hash can now impersonate the valid user. For true security you would need to secure the channel (HTTPS).

    2) Make sure you use an existing cryptographically secure hash. Don’t try to roll your own. I would recommend staying away from MD5. Given this is a greenfield situation and SHA1 implementations exists there is little reason to use MD5.

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

Sidebar

Related Questions

Question I'm creating a service for my app, but there's probably pritty simple thing
Question is : how to add any event in calender? i want to make
QUESTION: What am I missing or doing wrong? I'm trying to migrate fully functional
Question: I want to test an if statement in PostgreSQL: IF (SELECT COUNT(*) FROM
Question I need to make a short write to a file every 15 seconds
Question: How can I give a new user almost all privileges, but still keep
Question: I want to untar a tarfile which has many tar files within itself
Question is rather simple but I couldn't find nice & clean solution to my
Question: I want to populate a LINQ table from code, not DataBase. Is it
Question is pretty self explanitory. I want to do a simple find and replace,

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.