Skip to content

A Python program that generates signatures for HikIOT requests data.

License

Notifications You must be signed in to change notification settings

Little-King2022/HikIOT_signature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HikIOT_signature

GitHub last commit GitHub Repo stars

A Python program that generates MD5 signatures for HikIOT requests data.

The HTTP request body should be as follows, and the header contains a MD5 key named 'sign'.

1730800346569

Signature Analysis

This signature function creates a unique hash by sorting an input dictionary's keys, concatenating the key-value pairs into a string, and applying MD5 hashing twice. First, it generates an MD5 hash from the concatenated string. Then, it combines this hash (in uppercase) with a fixed salt string and hashes it again, returning the final result in uppercase.

Notice

The salt used for encryption may change in subsequent version updates. Welcome to Pull Requests and improve this project together.

Usage

Pass the JSON data you need to send into the get_sign function, and then return the signature.

from hikiot_sign import get_sign

data = {
    "deviceSerial": "",
    "longitude": xxx,
    "latitude": xxx,
    "clockSite": "xxx",
    "address": "xxx",
    "deviceName": "xxx",
    "wifiName": "xxx",
    "wifiMac": "xxx"
}

data_sign = get_sign(data)

Demo Server

This repo also provides a demo Flask API server in demo_server.py. You can build your own backend server.

About

A Python program that generates signatures for HikIOT requests data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages