Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top