sha256 turkish character problem (Podge) - نوشته شده در (927 Views)
New Member
realnus
مطلب: 77
77
Hi , in one of my previous post I asked about the snitz passwords coding and it works sha256 coding you know... Here is my old post ... http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=58984&SearchTerms=sha256

everything works well except sth ... for example with my coding and snitz sha coding
password1254sdsas gives the same result ...
But if a turkish character included it changes ...
For example
snitz coding password : caným
result is : 9fbb8eea2fab7f150a182340b57c1b3b24d4e061089e6e811af3900c2092adb0

result with mine : a17d9c1ae955bfd988900353efbd7b482d1644d55e04a034f1aa7ceb768e936d

as you see they are absolutely different ...a turkish character gives the exact change ... I am pasting my codes below
Let me remind , I am coding vith asp.net (Vb.net)

Dim txtaktivasyon As String
Dim stranahtar as string = passfield.text.tostring()
Dim HashValue() As Byte
Dim UE As New System.Text.UTF7Encoding
Dim ContentBytes As Byte()
Dim oSHA As New SHA256Managed
ContentBytes = UE.GetBytes(stranahtar)
HashValue = oSHA.ComputeHash(ContentBytes)
For Each chars As Byte In HashValue
If Len(Hex(chars).ToString) = 1 Then
txtaktivasyon &= "0" & Hex(chars).ToString
response.write( Hex(chars).ToString)
Else
txtaktivasyon &= Hex(chars).ToString<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
New Member
realnus
مطلب: 77
77
Well , I decided to try some combinations for a password which is saldýray1983
I think snitz sha coding changes the turkish letters to another character (or characters) and codes according to this ...
Here are the combinations of my tries but It seems snitz doesn't Upper or lowercases those characters
..::snitz::
1720c4894971339393c2b4bf1677df82522e58e7b44ad7d47f95f68206d674b9 saldýray1983
............

.::Mine::.. 9477abe26e5956af62c8fb59723f5caed6086fc40e9bc545c85e8de43ee9af55 saldýray1983

2451ade3c0687413bfa22c88f3b3f784c21830b4cba42fcd8696d9bc950b2c78 SALDIRAY1983

b255cc7cb3f13a1a0af5152e305ee1fac7646f4fd874331950f7ff3bfd0750eb saldIray1983

1ff91ce39bf589f82ecbd58714d81eeba4b890700fc6cd8589e001e5e4cd0f7c saldÝray1983


9737d037ea08737354774c61e10b83b2eab66050ab7dc750c293e3eab19d736e saldiray1983

so the letter ý is being converted to which character ? what is the difference of the logics

<
نوشته شده در
Support Moderator
Podge
مطلب: 3776
3776
Snitz doesn't oficially support the Turkish language. You won't find which character ý is changed to. The simplest way to get Snitz & your code to produce the same result would be to replace those characters causing the problem in the password before they are encrypted in both your code and Snitz's sha function.
e.g.

replace (strPassword, "ý", "y") ' lowercase
replace (strPassword, "Ý", "Y") ' uppercase


<
نوشته شده در
New Member
realnus
مطلب: 77
77
sorry for late posting podge ... Thanks for your reply ... So as I have understood turkish characters are converted to some characters and thoose characters are being converted to smilar characters ..
For ex : ý >> #253; >> y

replacing ý to y works great :)

But there are some more characters and I dont know which they are smilar to

for ex :
ð >> #240; >> ? þ >> #254; >> ?

those two characters are smilar to what , or how can I find an information ... I searched google but couln't find an answer ... can you give me some keywords to search or do you know the way ?
<
نوشته شده در
New Member
realnus
مطلب: 77
77
hmm some characters can not be seen ... You can read the post above here : http://www.dpuportal.com/how/how.asp<
نوشته شده در
Support Moderator
Podge
مطلب: 3776
3776
Sorry, I don't speak Turkish.... I don't know what they should be converted to.
It doesn't really matter what they are converted to as long as it is consistent but you may end up with problems.
Is there any way you can use inc_sha256.asp to encrypt the passwords instead of the dotnet way ?<
نوشته شده در
New Member
realnus
مطلب: 77
77
Thanks podge , I have decided to open a new form for users to change their passwords . By using "forgot password" area ,the users are updating their passwords with non turkish including ones ... I couln't find a professional way to solve , but this is no matter ...<
 
شما باید یک متن وارد کنید