HowcanI generate the key,how can it be validated by the app.
How can I generate the key and how can it be validated by the application?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shivanand ArurRank #920 · 2.3K reputationPosted May 3, 2013, 2:49 AM EDT
public static string GenerateUniqueId()
{
long i = 1;
foreach (byte b in Guid.NewGuid().ToByteArray())
{
i *= ((int)b + 1);
}
return string.Format("{0:x}", i - DateTime.Now.Ticks);
This method will help u fetch a unique ID each time u run it. U can then use this ID and can store it in the database for a particular row. Apply ur logic for validation.
Please mark the answer as accepted if it helped.