admin 管理员组

文章数量: 887021


2024年2月4日发(作者:pc版管理系统)

List _persion = ();SHA1加密123456789public static string EncryptToSHA1(string str){ SHA1 sha1 = new SHA1CryptoServiceProvider(); byte[] bytes_sha1_in = es(str); byte[] bytes_sha1_out = eHash(bytes_sha1_in); string str_sha1_out = ng(bytes_sha1_out); str_sha1_out = str_sha1_e("-", ""); return str_sha1_out;}SHA512加密11public static string EncryptToSHA512(string str){ var sha = new SHA512Managed();

var bytes = es(str); var encryptedBytes = eHash(bytes); var encryptedInput = ng(encryptedBytes); encryptedInput = e("-", "");

return encryptedInput;}模拟Http发送Post或Get请求 public static string SendRequest(string requestUrl, string data, string contentType ="application/json", string requestMethod = , int connectionLimit = 100){ HttpWebRequesthttpWebRequest = null; string returnData = ""; try { httpWebRequest = (HttpWebRequest)(requestUrl); = requestMethod; tType = "application/json; charset=utf-8"; = null; ive = false; t = 1000 * 25;("Origin", "SIS API"); tionLimit = connectionLimit;leAlgorithm = false; tionLimit = 100;riteStreamBuffering = false; = "application/json"; byte[] dataArray =es(data); tLength = ; using (Stream requestStream =uestStream()) { (dataArray, 0, ); HttpWebResponsehttpWebResponse = (HttpWebResponse)ponse(); StreamReader streamReader = newStreamReader(ponseStream()); returnData = End(); ();(); } (); } catch (Exception ex) { throw ex; } finally { if (httpWebRequest != null){ (); httpWebRequest = null; } } return returnData;}


本文标签: 发送 管理系统 作者 模拟