数据内容加密

请求信息,需要根据需求生成 查看相关请求行为


这里以php为例

<?xml version="1.0" encoding="utf-8" ?>
<RequestData>
<ProductSearch>
<VmPro>1</VmPro>
<CpuPro>1</CpuPro>
<MemoryPro>1</MemoryPro>
<DiskPro>1</DiskPro>
<BandwidthPro>1</BandwidthPro>
</ProductSearch>
</RequestData>


info内容加密:

对请求数据进行base64编码, 并将运算得到的结果中加号(+)替换为(^)号

strtr(base64_encode($RequestData), '+', '^');


结果为:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8^DQo8UmVxdWVzdERhdGE^DQogICAgPFByb2R1Y3R
TZWFyY2g^DQogICAgICAgIDxWbVBybz4xPC9WbVBybz4NCiAgICAgICAgPENwdVBybz4xPC9DcHVQcm8^DQogICAgIC
AgIDxNZW1vcnlQcm8^MTwvTWVtb3J5UHJvPg0KICAgICAgICA8RGlza1Bybz4xPC9EaXNrUHJvPg0KICAgICAgICA8Q
mFuZHdpZHRoUHJvPjE8L0JhbmR3aWR0aFBybz4NCiAgICA8L1Byb2R1Y3RTZWFyY2g^DQo8L1JlcXVlc3REYXRhPg==


Infohash加密:

对请求信息(XML格式)进行十六进制大写MD5哈希运算得到的值

strtoupper(md5($RequestData));


结果为:

B5000186A936B0B500D8CED69E788F3A