[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Function to encrypt/decrypt a string

Asked by JagC in Active Server Pages (ASP)

Tags: decrypt, function, encrypt, string

Hi all

Overview
In a web app that I am developing I need to email the user a piece of info. After logging on to the system they will enter this piece of info and it will use this, as well as other bits of info from the database.

This string though needs to be encrypted. It is not for security reasons as such, just to obfuscate the actual string value. It is not a database key, an ID or anything like that. Just a simple string that we do not store but instead send to the client. (Unfortunately I am not allowed to provide any more information on this :(

Once they have logged on and entered the string, it will be decrypted and displayed on the screen. As a result, the function (or two) needs to be two way.

Requirements:
1. Encrypt a short character string consisting of characters, numbers and spaces (max leng about 5).
2. The encrypted string should be of fixed length (of about 8 characters)
3. The decryption function should take this encrypted string and convert it back exactly.
4. Must not require any kind of server side install (I have access to the server but do not trust 'unknown' components and there is no budget for it as it's not mission critical).

I've tried:
Standard ROT13 functions
these only work with characters and the length is the same as the original string - so no good

MD5 Hashing
A project I worked on years ago had a MD5 hash and unhash function (I know MD% is one way, but this one wasn't :). There are  a few sites that can MD5 hash a string and unhash it - but I can't find anything like this that actually displays the code. (I have an MD5 hashing function but not one to unhash it)

Various other code snippets
I've been googling this for hours, sorting through code trying to find something suitable. But no joy.

To re-iterate. The function(s) does not need to be massively complex - just enough to obfuscate the string and return a fixed length string that can then be decrypted.

I don't have the time to do it myself or I would :) Even though I just spent hours trying to find one :(
[+][-]07/05/07 09:39 AM, ID: 19425361Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Tags: decrypt, function, encrypt, string
Sign Up Now!
Solution Provided By: effx
Participating Experts: 4
Solution Grade: A
 
[+][-]07/05/07 09:41 AM, ID: 19425379Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 09:42 AM, ID: 19425386Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 09:47 AM, ID: 19425421Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 09:49 AM, ID: 19425436Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 10:12 AM, ID: 19425597Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 01:52 PM, ID: 19427228Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/05/07 01:53 PM, ID: 19427236Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/07 06:40 PM, ID: 19429048Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/06/07 12:25 AM, ID: 19430042Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/06/07 01:12 AM, ID: 19430178Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/06/07 03:28 AM, ID: 19430602Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81