如何在PHP中重新创建此.NET哈希?
byte[] bH = Encoding.UTF8.GetBytes(sT);
SHA1 sha1 = SHA1.Create();
byte[] hB = sha1.ComputeHash(bH);
StringBuilder hS = new StringBuilder(hB.Length * 2);
foreach (byte b in hB) {
hS.AppendFormat("{0:x2}", b);
}
finalValue = hS.ToString();
答案 0 :(得分:1)
答案:
$finalValue = sha1($sT);