我正在尝试编写函数来创buildsha512string在.net函数中的目标 public static string GetSHA512(string strPlain) { UnicodeEncoding UE = new UnicodeEncoding(); byte[] HashValue = null; byte[] MessageBytes = UE.GetBytes(strPlain); System.Security.Cryptography.SHA512Managed SHhash = new System.Security.Cryptography.SHA512Managed(); string strHex = string.Empty; HashValue = SHhash.ComputeHash(MessageBytes); foreach (byte b in HashValue) { strHex += String.Format("{0:x2}", b); } return strHex; } 这给出了结果 input : pass123 output: 2a6353744cc2914c602265f50d2e413d0561368775756392517abb340ef75d52ee0c5d3623ddd1826fd768a13dca8961f5957c75df0d793b9d7537aabe050705 我所尝试的是如下 -(NSString *)createSHA512:(NSString […]