Hello i am developing a encryption/decryption Application in which i am first converting string into its ascii values then reversing this ascii values and then generating the hex values of this reversed ascii values...

I have completed the encryption part as i am able to convert the string into hex values but now i have problem with decryption as i am converting hex into reversed ascii then again converting reversed ascii into correct but now the problem is how to convert this ascii values into plain text string...

For more understanding below is process how my code works...

suppose i have to encrypt text "Test"

Step 1 : text TEST is converted into its ascii value i.e. 84101115116

Step 2 : Ascii value of TEST is reversed i.e. 61151110148

Step 3 : Hex values of reversed ascii value is generated i.e. 36 31 31 35 31 31 31 30 31 34 38

so now encrypted text will be 36 31 31 35 31 31 31 30 31 34 38

here encryption ends..

Now when i start decryption

Step 1 : i generate ascii values from Hex i.e. 61151110148

Step 2 : Reverse The Ascii values so i will get actual ascii Values i.e. 84101115116

Step 3 : Here i am having the problem i am unable to figure out how to convert this ascii values into plain text....

Help Its Urgent...

You need to break down the ascii into usable references. Test in Ascii is as follow -

T=84, e=101, s=115, t=116. Once you have that you can convert the ascii to a string "Test". Below is a list of the ascii characters.

Your code would be something like -

``````Select Case Ascii

Case Is = "84"
StrText = "T"

Case Is = "101"
strText = "e"
'and so forth...

strResult = strText 'etc``````

Solved The Problem used a separator while converting string to its ascii values..

Now process is :

suppose i have to encrypt text "Test"

Step 1 : text TEST is converted into its ascii value i.e. 84:101:115:116:

Step 2 : Ascii value of TEST is reversed i.e. :611:511:101:48

Step 3 : Hex values of reversed ascii value is generated i.e. 3A 36 31 31 3A 35 31 31 3A 31 30 31 3A 34 38

so now encrypted text will be 3A 36 31 31 3A 35 31 31 3A 31 30 31 3A 34 38

here encryption ends..

Now when i start decryption

Step 1 : i generate ascii values from Hex i.e. :611:511:101:48

Step 2 : Reverse The Ascii values so i will get actual ascii Values i.e. 84:101:115:116:

Step 3 : Here i am generating character on the basis of separator like when ":" occures it print the character for ascii value before that separator...

``````?Chr(101)