?
Solved

Encryption !!

Posted on 2002-04-27
14
Medium Priority
?
331 Views
Last Modified: 2012-08-13
hi all,

i have one table in which some of the columns are encrypted. In the name column we have a value like this àóõüö¶åùûýÿ which stands for Prabha Nagarajan and àóõüö¶ê þýÿ for Prabha Sridharan.

Can anyone help me out in this issue. I would like to know the algorithm which is used for this encryption. Help me out

thanks

bharat
0
Comment
Question by:catchbharat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +3
14 Comments
 
LVL 1

Expert Comment

by:asafmm
ID: 6974417
catchbharat

I don't think it is Encryption !!!

If you are using SQL server that it maight be colation issue.

The server keep the data in different colations (there is a server default but you can change it for any object : DB, table, etc..)

Try to use the folowing TSQL (you can run it in the Quey Analayser)
ALTER DATABASE <DBname>
COLLATE  <ColationName>

I used ColationName = SQL_Latin1_General_Cp1255_CI_AS in one case like yours.

Take a look on :

http://msdn.microsoft.com/library/en-us/architec/8_ar_da_6ttf.asp?frame=true
Will explain all you need on collations

http://msdn.microsoft.com/library/en-us/instsql/in_collation_6gfn.asp?frame=true
Show basic window collations

Thanks
Asaf
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6974629
If it is encrypted (which I am not sure of) you might want to look into the encrypt api.

CJ
0
 
LVL 1

Expert Comment

by:gron
ID: 6974775
If this is a private application it may well be encrypted with a simple programming technique using the XOR operator.
In this method, the "message" (in your case the name) is XOR'ed against a fixed "mask" or "code" which might be embedded in the program code. This could be a character string, or even a one-time computer generated random string. So there are 3 elements, the message, the mask, and the encrypted message. With any 2 of the elements, you can decode the third. In your 2 examples, applying XOR yields the two "masks" below, shown in 3-digit ascii character codes:

176118146151148151150171152102154124156098158096
176118146151148151150185082106154108156098158096
                      ______________

They should both be identical, but they are not in the underlined section. This could be explained by errors in your posted message, eg. printing non-printable characters. To be exact, I would require the ascii code sequences for your ecrypted column. More examples would also help. But based on the above, it looks like basix XOR encryption to me.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:gron
ID: 6974777
Please note, in my prior message, the underlining did not appear where it was intended, further down the line
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6975047
I don't suppose we can see any movement in your many open questions?  For the record:

Questions Asked 5
Last 10 Grades Given A  
Question Grading Record 1 Answers Graded / 1 Answers Received

In case you so feel inclined, here is the list of your open questions:
Writing on to a CD -RW from Mac OS 8.6 Directly , is it possible ? Date: 11/21/2001 03:23AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=macintosh&qid=20238360
A simple query !! Date: 12/11/2001 11:00PM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20245506
How to get rid of the startup programs ?? Date: 04/16/2002 06:21AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=winxp&qid=20290025

Anthony
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6977567
catchbharat, please close out your open questions... thanks!

Private Sub Command1_Click()
Dim sTemp As String
    sTemp = Encrypt("Prabha Nagarajan", True)
    MsgBox sTemp
    sTemp = Encrypt(sTemp, False)
    MsgBox sTemp

    sTemp = Encrypt("Prabha Sridharan", True)
    MsgBox sTemp
    sTemp = Encrypt(sTemp, False)
    MsgBox sTemp

End Sub

Private Function Encrypt(sSource As String, bEncrypt As Boolean) As String
Dim i As Long
Dim sTemp As String
Dim lTemp As Long

If bEncrypt Then
    For i = 0 To (Len(sSource) - 1)
        lTemp = Asc(Mid(sSource, i + 1, 1)) + (144 + i)
        If lTemp > 255 Then
            lTemp = lTemp - 255
        ElseIf lTemp < 0 Then
            lTemp = 255 + lTemp
        End If
        sTemp = sTemp & Chr(lTemp)
    Next i
Else
    For i = 0 To (Len(sSource) - 1)
        lTemp = Asc(Mid(sSource, i + 1, 1)) - (144 + i)
        If lTemp > 255 Then
            lTemp = lTemp - 255
        ElseIf lTemp < 0 Then
            lTemp = 255 + lTemp
        End If
       
        sTemp = sTemp & Chr(lTemp)
    Next i
End If

    Encrypt = sTemp
End Function
0
 
LVL 1

Expert Comment

by:gron
ID: 6977757
mdougan:
Very nice ! A simple offset.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6977836
really simple
0
 
LVL 18

Accepted Solution

by:
mdougan earned 1200 total points
ID: 6984181
Any feedback catchbharat?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6984209
mdougan,

I would not hold your breath.  catchbharat's current record:

Questions Asked 5
Last 10 Grades Given A A  
Question Grading Record 2 Answers Graded / 2 Answers Received

Anthony
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6984805
Oh, I'm not holding my breath, but I figure if they get enough e-mail notifications, they might try to do something about it.  Community Support has been pretty good about getting people to clean up their outstanding questions lately too.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6984998
I agree completely with you.  Perhaps one more email notification will do the trick. Don't you agree? <g>

Anthony
0
 

Author Comment

by:catchbharat
ID: 6985857
Thanks dougan as everyone suggested i have closed out all the questions. once again thanks a lot !!

bharat
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6987519
You're welcome, and thanks for clearing out out backlog :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question