Signature algorithm

Signature element

Element Key Remarks
Nonce Random number. GUID format, each time calling interface should be newly generated.
Timestamp Current UTC time stamp. 13-bit millisecond level.
App AppKey in the authentication information issued by the authorizer. The App data value of calling different Application should change accordingly.
Security The SecurityKey in the authentication information issued by the authorizer. The Security data value of calling different Application should change accordingly.
Service parameter Parameters required for each interface

Contents and delivery methods to be delivered by Signature

Delivery contents:
Element Key Remarks
Nonce Nonce in Signature Element
Timestamp Timestamp in Signature Element
App App in Signature Element
Sign Signature value by calculation
Delivery methods:

Add delivery contents to Http Header. No sequence requirement.

Algorithm

  1. Filter service parameters

    Add all service parameters to a Dictionary and filter out Item with a parameter value of null.

  2. Sort signature elements

    Add other signature elements and corresponding values to the Dictionary in the first step, and arrange them in ascending order according to the key of Dictionary to obtain the sorted Dictionary.

  3. Connect original signature string

    Connect the sorted dictionaries into strings.

    Individual items are combined in the form of key=value,and all combined items are connected with & symbols. Note that the value used here is actually the serialized value of this value.

  4. Call SHA-256 to encrypt the original signature string to obtain the signature value

    Call SHA-256 method to encrypt the original signature string, and the encrypted value is the signature value.

© Digital Maker Product Team all right reserved,powered by Gitbook该文件修订时间: 2023-02-02 10:40:12

results matching ""

    No results matching ""