如何将此.NET
代码写入PHP
string guid = Guid.NewGuid().ToString();
string content = DateTime.Now.ToString();
string encryptedContent = Cryptography.EncryptRijndael(content, guid);
Request Request = new Request
{
Password = encryptedContent,
requestNumber = 0,
UserName = "",
MAC = Encoding.Default.GetBytes(Cryptography.EncryptRSA("Token=" + guid + ";" +
"Hash=" + System.Convert.ToBase64String(Encoding.Default.GetBytes(Cryptography.GetSHA256Hash(content))),
ClientPublicKey, 4096)),
version = "",
customerCode = 3312
};
这是准备调用API的参数并获得响应
但我不能用PHP
语言