Coordinate Encryption Configuration

Coordinate Encryption tool is provided to support encryption of coordinate information of specified data by setting encryption algorithm. If you want the Coordinate Encryption tool to work, you first need to configure it based on a specific encryption algorithm.

Instructions for Use

  1. First, users need to have the necessary encryption algorithms.
  2. Next, compile to generate the dynamic library for Coordinate Encryption, which must contain the ListTransform function and the encryption function.
  • Declare the ListTransform function and encryption function in the header file (*.h). Sample code below:
    #ifdef WIN32
    #define USER_EXPORT __declspec(dllexport)
    #else
    #define USER_EXPORT
    #endif
    //encryption function 1.
    extern "C" USER_EXPORT bool Transform1(double srcX, double srcY, double srcZ, double& desX, double& desY, double& desZ);
    //encryption function 2.
    extern "C" USER_EXPORT bool Transform2(double srcX, double srcY, double srcZ, double& desX, double& desY, double& desZ);
    //ListTransform is used to get a list of encryption functions.
    extern "C" USER_EXPORT bool ListTransform(std::map<std::string,std::string>& mapFuncAnd);
  • implements the ListTransform function and the encryption function in the source file (*.cpp). Sample code below:
    //Implementation of the encryption function. Here, SRC represents the original coordinate value, and des represents the encrypted coordinate value. If the coordinate Z value is not encrypted, write desZ = srcZ in the encryption function implementation.
    //Implementation of encryption function 1.
    bool Transform1(double srcX, double srcY, double srcZ, double & desX, double & desY, double & desZ)
    <b>
    ......
    </b>
    //Implementation of encryption function 2.
    bool Transform2(double srcX, double srcY, double srcZ, double & desX, double & desY, double & desZ)
    <b>
    ......
    </b>
    //Implementation of the ListTransform function. The correct encryption function name must be added to the ListTransform or the encryption will fail.
    bool ListTransform(std::map<std::string,std::string>& mapFuncAnd)
    <b>
    MapFuncAnd. Emplace ( "Transform1", "Description of Encryption Algorithm 1");
    MapFuncAnd. Emplace ( "Transform2", "Description of Encryption Algorithm 2");
    

return ! mapFuncAnd.empty();


3. Once Completed, rename the result library file <b> SuStaticPluginUserPointTransform. Upt </b> and place it in the SuperMap iDesktopX package/bin folder.
4. If the Coordinate Encryption algorithm also depends on other dynamic libraries, copy and paste them to the SuperMap iDesktopX package/bin folder.
5. When finished, start SuperMap iDesktopX and use the Coordinate Encryption tool, where the encryption algorithm parameter is filled with the name of the encryption algorithm to be used, such as Transform1, Transform2, etc.