Signature Generation Algorithm

2021.12.17 09:49:19
    • Sort all request parameters (except signature parameter) by ASCII code of parameter name in ascending order. e.g., foo=1, bar=2, foo_bar=3, baz=4 after sorting is bar=2, baz=4, foo=1, foobar=3.
    • Concat the sorted parameter name and parameter value into a string as:key1value1key2value2... for above example the result is: bar2baz4foo1foobar3.
    • Append the secretKey (paired with the secretId) to the parameter string generated in the previous step, e.g., secretKey=6308afb129ea00301bd7c79621d07591, then the result string is bar2baz4foo1foobar36308afb129ea00301bd7c79621d07591.
    • Use UTF-8 to encode the string assembled in previous step.
    • Use the MD5 algorithm to calculate the value, and add it to the request signature parameter.

    Signature generation sample code is here. separated by programming language. for Java, the code is located in yidun/antispam-java-demo/.../

    Online Chat Tel:95163223