Overview

This document defines APIs of the GEODNET RTK service, including User Management and Base Station Coverage.

Encryption parameter

Parameter
Type
Description

appId

String

Application ID

appKey

String

Application Key

Encryption method

  1. Sort the keys of all request parameters in ascending character order, excluding appKey and sign.

  2. Concatenate the corresponding values by that key order to a single string.

  3. Concatenate the string with appKey (append).

  4. Compute MD5 hash of the final string to produce the sign value (hex lowercase).

# pseudo
ordered_keys = sort(keys(params - {sign}))
concat_values = ''.join(str(params[k]) for k in ordered_keys)
payload = concat_values + appKey
sign = md5_hex(payload)

Encryption example

Example parameter

appId: geodnet
appKey: 2916350764adb542

Request parameters

Parameter
Example
Type
Required
Description

appId

geodnet

String

Y

Application ID

username

geoduser

String

Y

username

password

geodpass

String

Y

password

trialDays

7

Number

Y

Free trial days

time

1718150400000

Number

Y

Current server timestamp in milliseconds

sign

8dd687e158219da6ccc689aef6c0a6a1

String

Y

Encrypted signature

Steps

  1. Parameter ordering (excluding sign)

appId,password,time,trialDays,username
  1. Field value concatenation

geodnetgeodpass17181504000007geoduser
  1. Concat with appKey

geodnetgeodpass17181504000007geoduser2916350764adb542
  1. Generate sign

md5("geodnetgeodpass17181504000007geoduser2916350764adb542")
= 8dd687e158219da6ccc689aef6c0a6a1

Implementation hints

// JavaScript (Node.js) example
import crypto from "crypto";

function buildSign(params, appKey) {
  const keys = Object.keys(params).filter(k => k !== "sign").sort();
  const concat = keys.map(k => String(params[k])).join("") + appKey;
  return crypto.createHash("md5").update(concat).digest("hex");
}

const params = { appId: "geodnet", username: "geoduser", password: "geodpass", trialDays: 7, time: 1718150400000 };
const sign = buildSign(params, "2916350764adb542");

Last updated