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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:29:21+00:00 2026-05-31T12:29:21+00:00

I am working on a short URL app, where the token must identify 2

  • 0

I am working on a short URL app, where the token must identify 2 values: the link ID and the user ID. Ideally this token should be short.

For example, considering the URL http://sho.rt/15qq6, the token “15qq6” must identify the link and user ID.

I guess one option is to insert both values in a table and use the auto-generated ID as a token, but I would rather not. I would prefer a solution involving encryption.

How could I use the .NET encryption classes for such purpose, if possible? Many thanks for your help.

  • 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-31T12:29:22+00:00Added an answer on May 31, 2026 at 12:29 pm

    I’m not clear on how short you want your code. I posted some code online to encrypt any number of query arguments.

    The result could be shortened by base64-encoding the result. That might still not be short enough for you though. (Note that I didn’t base64-encode it because I had some concerns about base64 encoding is case-sensitive.)

    Another approach would be to come up with a code that consists of an ID into your database and some sort of checksum. If the user tries modifying the ID, you could detect this. However, this approach may not be that secure since it might not be that hard to figure out how to create your own checksums.

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

Sidebar

Related Questions

I'm putting together a short URL functionality for an app I'm working on and
This is a short example of an array that I am working with. Array
So I have been working on this project for a short while now. I
OK, so I'm working on my first solo Rails app, a URL shortener, and
I'm working on a handling a custom URL Scheme in an app and am
I wrote the class Link which has a method shortTolong() this should return the
I've seen a number of posts on UIGetScreenImage, however, not a complete working (short)
I'm currently working on a very short project on Prolog, and just got stuck
I'm currently working on a small short-lived project. But despite the size it's complicated
I'm working with the Text_Diff PEAR package to diff to short text documents, where

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.