Nirjana NP

Nirjana NP

  • NA
  • 4
  • 7.7k

MessageDigest equivalent to C#?

Apr 21 2017 10:52 AM
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)