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

  • Home
  • SEARCH
  • 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 1017785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:45:26+00:00 2026-05-16T10:45:26+00:00

Is there any known hashing algorithm, which for similar input returns similar output? I

  • 0

Is there any known hashing algorithm, which for similar input returns similar output?
I need it for creating ‘tickets’ without checking them against DB. My idea is that I create token carrying (userID and timestamp) (not reversable), and pass this token along with userID, and be able to check, if the token has given UserID, and, for example, was created 10 minutes ago –

for example, change on first 4 bytes gives significantly different tokens, but with change on last 4 bytes the hashing function returns similar tokens.

  • 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-16T10:45:26+00:00Added an answer on May 16, 2026 at 10:45 am

    Hm. I’d probably try HMACs: generate a secret key only known to your application. Whenever you need to hand out a new “ticket”,

    • concatenate user ID and timestamp (say, using serialized representations)
    • create a HMAC digest of the above , using the “secret key” as the signing key

    Then hand out the triple (user ID, timestamp, digest) to other parties. In order to veriy such a ticket, just do the same:

    • extract the user ID and timestamp from the triple.
    • generate the HMAC just like above from this information

    The generated digests have to match, otherwise someone did try to present you a tampered ticket. This is secure, since only your application knows the secret key, and thus, can generate a suitable HMAC digest. Since the timestamp information comes back plain to you, you can make all required tests with respect to some timing window or whatever.

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

Sidebar

Related Questions

Are there any known hash algorithms which input a vector of int's and output
Are there any known methods of finding peers without using a dedicated central server?
Is there any known way of listing the WMI classes and their properties available
Are there any known issues around how many pages are in an ASP.NET project?
Are there any known security issues related to running a web application via a
Are there any known issues with canceling HttpWebRequest HTTP requests? We find that when
Are there any known how-tos or best practices for web service REST API versioning?
In short: Is there any known protocol for remote process management? I have a
I am wondering if there are any well-known algorithms that I should be aware
Is there any libraries that would allow me to use the same known notation

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.