The public static string HMACSHA256 (string EncryptText, string the EncryptKey) {Using var MAC & # 61; New HMACSHA256 (Encoding UTF8. GetBytes (the EncryptKey));Var hash & # 61; Mac.Com puteHash (Encoding UTF8. GetBytes (EncryptText));Var TXT & # 61; Encoding. UTF8. GetBytes (EncryptText);Var all & # 61; New byte [hash Length & # 43; TXT, Length].Array. Copy (hash, 0, all, 0, hash Length);Array. Copy (. TXT, 0, all, hash Length, TXT. Length);Using var md5 & # 61; MD5. The Create ();Return the Convert. ToBase64String (md5.Com puteHash (all));}
because don't know much about.net & # xff0c; Consult how to put this method into the PHP & # xff1f; Request the result of the encryption is consistent,