Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

return the same values

$
0
0

Hello friends,

I have a method that runs  on my .asmx web service and I want to use the same code on client's silverlight.

My question is if the method will return the same value no matter the version of windows that is installed on the client's machine or on the server.

This is the method:

private string encode(string text)
{
string returned_text = "";
UnicodeEncoding uEncode = new UnicodeEncoding();
byte[] bytClearString = uEncode.GetBytes(text);
System.Security.Cryptography.MD5Cng sha =new System.Security.Cryptography.MD5Cng();
byte[] hash = sha.ComputeHash(bytClearString);
StringBuilder sb = new StringBuilder();
sb.Append(Convert.ToBase64String(hash));

sb.Replace("=", "");
sb.Replace("\\", "");
sb.Replace("/", "");
sb.Replace("+", "");
sb.Replace("-", "");
sb.Replace("?", "");


returned_text = sb.ToString();
return returned_text.ToLower();
}
Thank you.


Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>