1
Answer

MessageDigest equivalent to C#?

Nirjana NP

Nirjana NP

7y
762
1
What is the equivalent C# code of below Java code?
 
java.security.MessageDigest d = null;
d = java.security.MessageDigest.getInstance("SHA-1");
d.reset();
d.update(user_password.getBytes());
user_password = new String(d.digest());
user_password=user_password.replaceAll("\ufffd","?");
 
FYI... this code returns something likd ~£ž¹_WÁÞQAÐùß9Ã0Ï which I never done in C#.
 
Thanks in Advance !!! 
Answers (1)