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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:58:37+00:00 2026-06-14T08:58:37+00:00

I am setting up a voucher code system for a checkout written in C#

  • 0

I am setting up a voucher code system for a checkout written in C# and I want to be able to distribute unique vouchers that do the same thing, sort of like a product key.

Is there any way of generating unique (fairly short and preferably alpha-numeric) strings that will “hash” in some way to give the same result?

In other words, can I start with a defined voucher code and get multiple results for a reverse hash?

I’m sorry if I’m not explaining this very well – I can give more information if needed.

EDIT: I know that I could use a look-up table with pre-defined codes, but I was wondering if there is a way to auto-generate these codes to allow the system to scale 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-06-14T08:58:39+00:00Added an answer on June 14, 2026 at 8:58 am

    Here’s a thought…

    Start w/ some secret password: “100:mypass:yourpass”

    then md5 that: you’ll get

    md5("10:mypass:yourpass")=f6ff5421b31e609c7dcd19c4a462caa0
    
    'key 1'=>  left 16 chars of md5 = 'f6ff5421b31e60'
    
      run the right 16 chars of the md5 it into another md5:
    
    md5('7dcd19c4a462caa0') = 582fbfb7a035d08094cdef57d88f720e
    
    'key 2' => '582fbfb7a035d080'
    
    [repeat again here, and again... and again, ]
    

    …

    Not sure on the ‘distribution’ point on this, e.g. if it will be running on a POS type gift card or voucher card system or what, but if you notice I put 3 components into the ‘password’, this value could contain the total legitimate keys (split on “:”, resulting in a break on 100 valid keys ), a system (distributor) password, and a local system password that would be required to ‘verify’ or ‘match’ on a ‘good’ key. You could just do a quick scan to see if the key exists or not and write an invalidation routine locally. I know, my math genius friends would probably say there’s a better, more secure and effective way but hey… this is what you asked for right? I’m a simple man and like simple things… but you could make it more complicated by allowing for ranges too…
    e.g. pass=> "100:1000:pass1:pass2" that way you could test the 100->1000th md5’s partial keys…
    Cheers!!

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

Sidebar

Related Questions

I have a voucher system in my shopping cart, the vouchers have a valid
Setting default values for System Configuration fields is well understood (via Chapagain and blog
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
After setting up a replication on my server (SQL2005) I have noticed that default
after setting all config file and runtime options for charset that i can find
Setting up CI within Microsoft Team Foundation Server, I have a build that will
Setting up a new database that has a comments table. I've been told to
Setting up a WCF service that uses the webHttpBinding... I can return complex types
Setting: Java 5 - no upgrade possible. I have a large application that has
Setting variables as returned lists from functions that contain variables as a returned list

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.