如何将这部分.NET代码转换为PHP

时间:2018-02-21 02:55:51

标签: c# php asp.net .net

如何将此.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语言

写这个

0 个答案:

没有答案