I have used microsoft "system.security.cryptography" to make md5 in c# application but I need something in javascript to make a similar md5 value at the client side, I googling and I found a site Paj's Cryptography that has been created using javascript also in "ymail.com" we can see something exactly the same all password change to md5 at the client side and then send them to server, but the problem is algorithm I don't know what kinds of algorithm we have ? the results are different I want to match the md5 password in server with microsoft version.
Asked
Active
Viewed 1,706 times
1
-
you really shouldn't give away your hashing mechanism by showing how you do it in your client-side code. I'm not 100% sure what you are doing... but reading this wikipedia article on Salt should give you some ideas of possible security concerns you might have with what you are actually doing (http://en.wikipedia.org/wiki/Salt_(cryptography)) – John Sobolewski Jan 23 '12 at 14:45
-
Can you explain what you're trying to do? Your post gives me the impression that what you're trying to do is conceptually wrong and insecure. – CodesInChaos Jan 23 '12 at 14:52
-
because there is path and there are many hacker in network path you look at the yahoo login security – kamiar3001 Jan 23 '12 at 15:00
-
Why MD5 anyway? It's essentially dead. Cracked beyond repair. – harold Jan 23 '12 at 15:28
-
1@kamiar3001 In that case it's almost certain that client side hashing won't help. Use SSL/TLS. – CodesInChaos Jan 23 '12 at 20:03
1 Answers
5
C# md5 output may look like: 09-8F-6B-CD-46-21-D3-73-CA-DE-4E-83-26-27-B4-F6
Javascript md5 output looks like: 098f6bcd4621d373cade4e832627b4f6
To make it look the same, just take your c# output and do this:
csharp_md5.ToLower().Replace('-', '');
md5 is an identical medium across all languages, the resulted alphanumeric characters are always the same.

Nahydrin
- 13,197
- 12
- 59
- 101