[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

Encryption !!

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
catchbharat
Asked:
catchbharat
  • 5
  • 3
  • 3
  • +3
1 Solution
 
asafmmCommented:
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
 
CJ_SCommented:
If it is encrypted (which I am not sure of) you might want to look into the encrypt api.

CJ
0
 
gronCommented:
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
Independent Software Vendors: 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!

 
gronCommented:
Please note, in my prior message, the underlining did not appear where it was intended, further down the line
0
 
Anthony PerkinsCommented:
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
 
mdouganCommented:
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
 
gronCommented:
mdougan:
Very nice ! A simple offset.
0
 
mdouganCommented:
really simple
0
 
mdouganCommented:
Any feedback catchbharat?
0
 
Anthony PerkinsCommented:
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
 
mdouganCommented:
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
 
Anthony PerkinsCommented:
I agree completely with you.  Perhaps one more email notification will do the trick. Don't you agree? <g>

Anthony
0
 
catchbharatAuthor Commented:
Thanks dougan as everyone suggested i have closed out all the questions. once again thanks a lot !!

bharat
0
 
mdouganCommented:
You're welcome, and thanks for clearing out out backlog :)
0

Featured Post

Technology Partners: 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!

  • 5
  • 3
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now