Decryption library file calling method and system compatible with multiple platforms and multiple languages

CN120492056APending Publication Date: 2025-08-15SHANGHAI TOSUN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510540552.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-25
Filing Date
2025-04-25
Publication Date
2025-08-15

Smart Images

  • Figure CN120492056A_ABST
    Figure CN120492056A_ABST
Patent Text Reader

Abstract

The invention relates to a computer software technology, in particular to a decryption library file calling method and system compatible with multiple platforms and multiple languages, and the decryption library file calling method comprises the steps that a host process serves as a calling party, and after calling of a decryption function is triggered, the decryption function is called; judging whether a function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; if the function library is a DotNet type library file, the host process calls a decryption function by starting a first agent process, and a result is fed back to the host process after calling of the first agent process is completed; and if the function library is the Win32 type library file, judging whether the current operation platform of the host process is matched with the version of the function library or not, if so, directly calling a decryption function by the host process, otherwise, calling the decryption function by starting a second agent process or a third agent process by the host process. And the second agent process or the third agent process feeds back a result to the host process after calling is completed.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is based upon and claims the benefit of priority from Chinese patent application No. 2024105027165, filed on April 25, 2024. The entire contents of the above application are incorporated herein by reference. Technical Field

[0002] The present invention relates to computer software technology, and in particular to a decryption library file calling method and system compatible with multiple platforms and multiple languages. Background Art

[0003] In the automotive industry, UDS-based diagnosis and CCP / XCP-based calibration are very common operations. These operations involve reading and writing variables inside the vehicle controller. In order to increase data security, a decryption controller operation is required before accessing the ECU. Only after this operation is completed can the data area in the controller be written through diagnosis and calibration. This decryption action is usually called Seed&Key in the automotive industry, which means obtaining the Seed, calling the function library, and generating the Key for decryption. In the existing technical solutions, the development of the function library may be an X86 or X64 dll generated by C / C++ from the perspective of the development language, or it may be a DotNet dll generated based on C#, VBDotNet, etc. From the perspective of the operating platform that calls the library function, it may be an X86 or X64 program, or it may be a DotNet program.

[0004] In the existing technical solution, if the calling program itself is a Win32 program, it can only directly call the Win32 function library and cannot directly call the DotNet function library; if the calling program itself is an X86 program, it cannot call the X64 format function library; and vice versa. This brings great difficulties to the interaction during the development process. Take Tire1, a company ranked among the top in the world, as an example. It has hundreds of customers, and each customer's controller has its own set of encryption and decryption programs. The development language and the platform type for compilation and release of these encryption and decryption programs are uncertain. It is possible to make hard requirements on the interface of these customer decryption programs, but it is impossible to make hard requirements on their development process language. This has brought great difficulties to Tire1's own diagnostic software system, resulting in the existence of dozens of diagnostic software sets at the same time internally, resulting in a large amount of waste of development and maintenance work.

[0005] Therefore, the existing technology has the technical problem that corresponding decryption programs need to be developed separately for different development languages and different operating platforms, which leads to interaction difficulties and a large development workload during the development process.

[0006] It should be noted that the above information disclosed in this background technology section is only used to understand the background technology of the present application concept, and therefore, the above description is not considered to constitute information of the prior art. Summary of the Invention

[0007] The purpose of the present invention is to provide a decryption library file calling method and system compatible with multiple platforms and multiple languages.

[0008] In order to solve the above technical problems, the present invention provides a decryption library file calling method compatible with multiple platforms and multiple languages, comprising:

[0009] As the caller, the host process, after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file;

[0010] If the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and

[0011] If the function library is a Win32 type library file, it is then determined whether the current running platform of the host process matches the version of the function library. If they match, the host process directly calls the decryption function. Otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed.

[0012] In another aspect, the present invention further provides a multi-platform and multi-language compatible decryption library file calling method system, comprising a computer device, wherein the computer device is configured to include:

[0013] The judgment module is configured with the host process as the caller. After triggering the decryption function call, it first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file. If the function library is a Win32 type library file, it then determines whether the current running platform of the host process matches the version of the function library;

[0014] A startup module is configured such that, if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and if the function library is a Win32 type library file and the host process's current running platform and the function library version do not match, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed;

[0015] The calling module is configured so that if the function library is a Win32 type library file and the current running platform of the host process matches the version of the function library, the host process directly calls the decryption function.

[0016] In a third aspect, the present invention further provides an electronic device, comprising:

[0017] Processor, readable storage medium, communication bus and communication interface; wherein

[0018] The processor, the readable storage medium and the communication interface communicate with each other via the communication bus;

[0019] The readable storage medium is used to store a program for executing the aforementioned method for calling a decryption library file compatible with multiple platforms and multiple languages, and the program enables the processor to execute operations corresponding to the aforementioned method for calling a decryption library file compatible with multiple platforms and multiple languages.

[0020] In a fourth aspect, the present invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables the aforementioned multi-platform and multi-language compatible decryption library file calling method to be executed.

[0021] In a fifth aspect, the present invention also provides a computer program product, comprising a program or instructions, wherein when the program or instructions are executed on a computer, the aforementioned multi-platform and multi-language compatible decryption library file calling method is executed.

[0022] The beneficial effects of the present invention are that the multi-platform and multi-language compatible decryption library file calling method of the present invention supports, from the perspective of the operating platform, both the 32-bit code library of X86 and the 64-bit code library of X64, and from the perspective of the language encoding type, both Win32 and DotNet type function libraries, thereby achieving simultaneous compatibility for library functions generated for different operating platforms and different language encoding types in the same calling program, and being able to cope with decryption function libraries developed based on C / C++ / Pascal and C# / VB.Net from different user groups. These decryption function libraries can be used in the same software system, effectively shortening the development cycle and reducing the development and maintenance workload.

[0023] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 A diagram showing the steps of a method for calling a decryption library file compatible with multiple platforms and languages according to some embodiments is provided;

[0027] Figure 2 A flowchart of a method for calling a decryption library file compatible with multiple platforms and languages according to some embodiments is shown;

[0028] Figure 3 A system principle block diagram of a multi-platform and multi-language compatible decryption library file calling method according to some embodiments is shown;

[0029] Figure 4 A functional block diagram of an electronic device involved in some embodiments is shown. DETAILED DESCRIPTION

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0031] The abbreviations and key terms involved in this embodiment are defined as follows:

[0032] Calibration: Calibration.

[0033] Diagnostic: Diagnosis.

[0034] Seed&Key: Get the seed and generate the key.

[0035] x86: 32-bit platform.

[0036] x64: 64-bit platform.

[0037] Win32: Mainly uses system programming languages such as C / C++ and directly calls Windows API to run.

[0038] DotNet: Developed using system programming languages such as C# and VBNet, and runs based on the DotNet virtual machine.

[0039] dll (Dynamic Link Library): dynamic link library.

[0040] In the existing technical solution, if the calling program itself is a Win32 program, it can only directly call the Win32 function library and cannot directly call the DotNet function library; if the calling program itself is an X86 program, it cannot call the X64 format function library; and vice versa. This brings great difficulties to the interaction during the development process. Take Tire1, a company ranked among the top in the world, as an example. It has hundreds of customers, and each customer's controller has its own set of encryption and decryption programs. The development language and the platform type for compilation and release of these encryption and decryption programs are uncertain. It is possible to make hard requirements on the interface of these customer decryption programs, but it is impossible to make hard requirements on their development process language. This has brought great difficulties to Tire1's own diagnostic software system, resulting in the existence of dozens of diagnostic software sets at the same time internally, resulting in a large amount of waste of development and maintenance work.

[0041] Therefore, at least one embodiment provides a multi-platform and multi-language compatible decryption library file calling method, including:

[0042] As the caller, the host process, after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file;

[0043] If the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and

[0044] If the function library is a Win32 type library file, it is then determined whether the current running platform of the host process matches the version of the function library. If they match, the host process directly calls the decryption function. Otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed.

[0045] Specifically, the host process refers to the main process that runs directly in the automobile development software platform (the automobile development software platform can be a mature platform already available on the market, or it can be an independently developed platform with automobile development functions). In this embodiment, it serves as the caller of the decryption function.

[0046] Specifically, the first, second, and third proxy processes communicate with the host process through corresponding pipeline technologies.

[0047] This multi-platform and multi-language compatible decryption library file calling method supports both X86 32-bit code libraries and X64 64-bit code libraries from the perspective of the operating platform, and supports both Win32 and DotNet type function libraries from the perspective of the language encoding type. This achieves compatibility with library functions generated on different operating platforms and with different language encoding types in the same calling program, and can handle decryption function libraries developed based on C / C++ / Pascal and C# / VB.Net from different user groups, allowing these decryption function libraries to be used in the same software system.

[0048] Various non-limiting implementations of the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0049] like Figure 1 As shown, some embodiments provide a decryption library file calling method compatible with multiple platforms and languages, including:

[0050] Step S101: The host process, as the caller, after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file;

[0051] Step S102: If the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and

[0052] In step S103, if the function library is a Win32 type library file, it is determined whether the current running platform of the host process matches the version of the function library. If they match, the host process directly calls the decryption function. Otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed.

[0053] Specifically, the multi-platform and multi-language compatible decryption library file calling method of this embodiment realizes the simultaneous compatibility of library functions generated for different operating platforms and different language encoding types in the same calling program through the above steps, effectively shortening the development cycle and reducing the development and maintenance workload.

[0054] like Figure 2As shown, in some embodiments, if the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the method of feeding back the result to the host process after the first proxy process call is completed includes: starting the first proxy process DotNetKeyGenServer.exe through the Windows pipeline; using the reflection mechanism in the first proxy process DotNetKeyGenServer.exe to obtain the Seed&Key decryption function interface type and parameters; and calling the Seed&Key decryption function through the reflection method, passing in the seed Seed value, obtaining the Key value, and returning the Key value to the host process.

[0055] Specifically, after triggering the Seed&Key decryption function call, first check whether the function library is a DotNet function library.

[0056] If it is a DotNet function library, the host process starts the first agent process DotNetKeyGenServer.exe through the Windows pipe, and communicates with the first agent process DotNetKeyServer.exe through the pipe technology. In the first agent process DotNetKeyServer.exe, the reflection technology of the DotNet language is used to obtain the decryption function interface type and parameter type, pass in the seed value, calculate the corresponding Key value, and return the Key value to the host process.

[0057] Specifically, the code snippet for obtaining the Seed&Key decryption function interface type and parameters through the reflection mechanism and calling the Seed&Key decryption function is as follows:

[0058] / / Load the DLL through the Assembly class in DotNet

[0059] Assembly assembly=Assembly.LoadFrom(dllPath);

[0060] / / Get all public non-static methods in the dll (including constructors)

[0061] MethodInfo[]methods=assembly.GetExportedTypes().SelectMany(t=>t.GetMethods()).ToArray();

[0062] foreach(MethodInfo method in methods{ / / Loop through the function body to check the function interface name and parameters, select the interface that matches the loaded function library, and execute it}.

[0063] like Figure 2 As shown, in some embodiments, if the function library is a Win32 type library file, and it is determined that the current running platform of the host process matches the version of the function library, the method for the host process to directly call the decryption function includes: if the current running platform of the host process is an X86 program and the function library is an X86 version of the Win32 function library or the current running platform of the host process is X64 and the function library is an X64 version of the Win32 function library, the host process directly calls the Seed&Key decryption function to obtain the Key value.

[0064] like Figure 2 As shown, in some embodiments, if the function library is a Win32 type library file, and it is determined that the current running platform of the host process and the version of the function library do not match, the host process will call the decryption function by starting a second agent process or a third agent process, and the method of feeding back the result to the host process after the second agent process or the third agent process is completed includes: if the current running platform of the host process is an X86 program, and the function library is an X64 version of the Win32 function library, then through the Windows pipeline, start the second agent process X64KeyGenServer.exe, and through the second agent process

[0065] X64KeyGenServer.exe calls the Seed&Key decryption function to obtain the Key value and returns the Key value to the host process.

[0066] Specifically, the second agent process X64KeyGenServer.exe plays the role of an execution agent. The X86 operating platform where the host process is located directly calls the second agent process X64KeyGenServer.exe through pipeline communication technology, thereby actually calling the X64 version of the function library through the second agent process X64KeyGenServer.exe, thereby solving the problem that the X86 operating platform cannot directly call the X64 version of the dll.

[0067] Specifically, use CreatePipe to establish two pipes and obtain pipe handles. One pipe is used for input and the other is used for output of the child process to be executed on the console. This child process is the second proxy process X64KeyGenServer.exe (for the sake of convenience, X64KeyGenServer.exe is referred to as the child process and the host process is referred to as the parent process in this paragraph). First, use GetStartupInfo to obtain StartupInfo, use the first pipe handle to replace hStdInput in StartupInfo, and use the second pipe handle to replace hStdOutput and hStdError, that is, the standard input, output, and error handles. Use CreateProcess to execute the child process X64KeyGenServer.exe. The input and output of the child process established in this way are directed to the parent process in the pipe. Use ReadFile to read the second pipe to obtain the output of the child process, and use WriteFile to write to the first pipe to write the input to the child process. The parent process can use PeekNamedPipe to query whether the child process has output. After the child process ends, use CloseHandle to close both pipes.

[0068] like Figure 2 As shown, in some embodiments, if the function library is a Win32 type library file, and it is determined that the current running platform of the host process and the version of the function library do not match, the host process will call the decryption function by starting a second agent process or a third agent process, and the method of feeding back the result to the host process after the second agent process or the third agent process is completed also includes: if the current running platform of the host process is X64, and the function library is an X86 version of the Win32 function library, then through the Windows pipeline, start the third agent process X86KeyGenServer.exe, and call the Seed&Key decryption function through the third agent process X86KeyGenServer.exe to obtain the Key value, and return the Key value to the host process.

[0069] Specifically, the X64 operating platform where the host process is located directly calls the third agent process X86KeyGenServer.exe through the pipeline communication technology, thereby

[0070] The process of X86KeyGenServer.exe actually calling the X86 version of the function library is similar to the process of the aforementioned X86 operating platform directly calling the second agent process X64KeyGenServer.exe through pipeline communication technology, and then actually calling the X64 version of the function library through the second agent process X64KeyGenServer.exe. It will not be repeated here.

[0071] like Figure 3 As shown, some embodiments further provide a decryption library file calling system compatible with multiple platforms and multiple languages, including a computer device, wherein the computer device is configured to include:

[0072] The judgment module is configured with the host process as the caller. After triggering the decryption function call, it first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file. If the function library is a Win32 type library file, it then determines whether the current running platform of the host process matches the version of the function library;

[0073] A startup module is configured such that, if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and if the function library is a Win32 type library file and the host process's current running platform and the function library version do not match, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed;

[0074] The calling module is configured so that if the function library is a Win32 type library file and the current running platform of the host process matches the version of the function library, the host process directly calls the decryption function.

[0075] Among them, the specific implementation functions of the judgment module, the startup module and the calling module are implemented in the computer device. For details, please refer to the content of the aforementioned decryption library file calling method compatible with multiple platforms and languages, which will not be repeated here.

[0076] The electronic device in the embodiment of the present disclosure is described below from the perspective of hardware processing:

[0077] The embodiments of the present disclosure do not limit the specific implementation of the electronic device.

[0078] like Figure 4 As shown, some embodiments further provide an electronic device comprising: a processor, a readable storage medium, a communication bus, and a communication interface; wherein the processor, the readable storage medium, and the communication interface communicate with each other via the communication bus; the readable storage medium is used to store a program for executing the multi-platform and multi-language compatible decryption library file calling method, and the program enables the processor to execute operations corresponding to the multi-platform and multi-language compatible decryption library file calling method.

[0079] In some embodiments, a computer device or an industrial computer can also be used as a type of electronic device.

[0080] Figure 4 The structure shown does not limit the electronic device and may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.

[0081] In some embodiments, the communication interface may be an RS232, RS485, USB port, or TYPE port, which may be connected to an external bus adapter. It may also include a wired or wireless network interface. The network interface may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is typically used to establish a communication connection between the computer device and other electronic devices.

[0082] In some embodiments, the readable storage medium or computer-readable storage medium includes at least one type of memory, including flash memory, hard disk, multimedia card, card-type memory (such as SD memory, etc.), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, it can be an internal storage unit of a computer device, such as the hard disk of the computer device. In other embodiments, the memory can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Furthermore, the memory can also include both an internal storage unit of the computer device and an external storage device. The memory can be used not only to store application software and various types of data installed in the computer device, such as computer program code, but also to temporarily store data that has been output or is to be output.

[0083] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, used to run program codes stored in a memory or process data, such as executing a computer program.

[0084] In some embodiments, the communication bus may also be an input / output bus, which may be a Peripheral Component Interconnect (PCI) bus or an Enhanced Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0085] Optionally, the computer device may further include a user interface, which may include a display and an input unit such as a keyboard. Optionally, the user interface may also include a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display may also be appropriately referred to as a display screen or a display unit, and is used to display information processed by the computer device and to display web pages.

[0086] When the processor executes the program, the above Figure 1 The steps in the embodiment of the remote deployment method of the software platform user interface shown are, for example Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules or units in the above-mentioned device embodiments are realized.

[0087] Some embodiments also provide a readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables a decryption library file calling method compatible with multiple platforms and multiple languages to be executed; the decryption library file calling method compatible with multiple platforms and multiple languages includes: the host process acts as the caller, and after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and after the first proxy process completes the call, the result will be fed back to the host process; and if the function library is a Win32 type library file, then it is determined whether the current running platform of the host process and the version of the function library match. If they match, the host process directly calls the decryption function; otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and after the second proxy process or the third proxy process completes the call, the result will be fed back to the host process.

[0088] Some embodiments also provide a computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables the decryption library file calling method compatible with multiple platforms and multiple languages as described above to be executed, specifically: the host process acts as the caller, and after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and after the first proxy process completes the call, the result will be fed back to the host process; and if the function library is a Win32 type library file, then it is determined whether the current running platform of the host process and the version of the function library match. If they match, the host process directly calls the decryption function; otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and after the second proxy process or the third proxy process completes the call, the result will be fed back to the host process.

[0089] Please refer to the detailed description of the decryption library file calling method compatible with multiple platforms and languages, which will not be repeated here.

[0090] Some embodiments also provide a computer program product, including a program or instruction, wherein when the program or instruction is executed on a computer, a decryption library file calling method compatible with multiple platforms and multiple languages is executed; the decryption library file calling method compatible with multiple platforms and multiple languages includes: the host process acts as the caller, and after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and after the first proxy process completes the call, the result will be fed back to the host process; and if the function library is a Win32 type library file, then it is determined whether the current running platform of the host process and the version of the function library match. If they match, the host process directly calls the decryption function, otherwise the host process will call the decryption function by starting a second proxy process or a third proxy process, and after the second proxy process or the third proxy process completes the call, the result will be fed back to the host process.

[0091] Some embodiments also provide a computer program product, including a readable storage medium on which a readable program code is stored, the readable program code including instructions, which enable at least one processor (one or more computer devices) to perform the following operations: the host process acts as the caller, and after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and after the first proxy process completes the call, the result will be fed back to the host process; and if the function library is a Win32 type library file, then it is determined whether the current running platform of the host process and the version of the function library match. If they match, the host process directly calls the decryption function; otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and after the second proxy process or the third proxy process completes the call, the result will be fed back to the host process.

[0092] In some embodiments, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and embedded program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of a code, and the module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action.

[0093] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0094] If the functions are implemented as software modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This embedded software product, stored in a storage medium, executes all or part of the steps of the methods described in various embodiments of the present invention.

[0095] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.

Claims

1. A decryption library file calling method compatible with multiple platforms and multiple languages, characterized in that: include: As the caller, the host process, after triggering the decryption function call, first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file; If the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; as well as If the function library is a Win32 type library file, it is then determined whether the current running platform of the host process matches the version of the function library. If they match, the host process directly calls the decryption function. Otherwise, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed.

2. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 1, characterized in that: If the function library is a DotNet type library file, the host process will call the decryption function by starting the first proxy process, and the method of feeding back the result to the host process after the first proxy process completes the call includes: Start the first agent process through the Windows pipeline; Using the reflection mechanism in the first proxy process to obtain the Seed&Key decryption function interface type and parameters; and The Seed&Key decryption function is called through the reflection method, the seed value is passed in, the Key value is obtained, and the Key value is returned to the host process.

3. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 2, characterized in that: The first agent process is DotNetKeyGenServer.exe.

4. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 2, characterized in that: If the function library is a Win32 type library file, and it is determined that the current running platform of the host process matches the version of the function library, the method for the host process to directly call the decryption function includes: If the host process is currently running on an X86 platform and the function library is the X86 version of the Win32 function library, or if the host process is currently running on an X64 platform and the function library is the X64 version of the Win32 function library, the host process directly calls the Seed&Key decryption function to obtain the Key value.

5. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 4, characterized in that: If the function library is a Win32 type library file, and it is determined that the current running platform of the host process does not match the version of the function library, the host process will call the decryption function by starting a second agent process or a third agent process, and after the second agent process or the third agent process completes the call, the method of feeding back the result to the host process includes: If the host process is currently running on an X86 program and the function library is the X64 version of the Win32 function library, the second agent process X64KeyGenServer.exe is started through the Windows pipeline, and the Seed&Key decryption function is called through the second agent process to obtain the Key value, and the Key value is returned to the host process.

6. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 5, characterized in that: The second agent process is X64KeyGenServer.exe.

7. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 5, characterized in that: If the function library is a Win32 type library file, and it is determined that the current running platform of the host process does not match the version of the function library, the host process will call the decryption function by starting a second agent process or a third agent process, and after the second agent process or the third agent process completes the call, the method of feeding back the result to the host process also includes: If the host process currently runs on X64 and the function library is the X86 version of the Win32 function library, the third agent process is started through the Windows pipeline, and the Seed&Key decryption function is called through the third agent process to obtain the Key value, and the Key value is returned to the host process.

8. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 7, characterized in that: The third agent process is X86KeyGenServer.exe.

9. The method for calling a decryption library file compatible with multiple platforms and multiple languages according to claim 1, characterized in that: The first, second and third agent processes communicate with the host process through corresponding pipeline technologies respectively.

10. A decryption library file calling system compatible with multiple platforms and multiple languages, characterized in that: comprising a computer device, the computer device being configured to include: The judgment module is configured with the host process as the caller. After triggering the decryption function call, it first determines whether the function library corresponding to the decryption function is a DotNet type library file or a Win32 type library file. If the function library is a Win32 type library file, it then determines whether the current running platform of the host process matches the version of the function library; A startup module is configured such that, if the function library is a DotNet type library file, the host process will call the decryption function by starting a first proxy process, and the first proxy process will feed back the result to the host process after the call is completed; and if the function library is a Win32 type library file and the host process's current running platform and the function library version do not match, the host process will call the decryption function by starting a second proxy process or a third proxy process, and the second proxy process or the third proxy process will feed back the result to the host process after the call is completed; The calling module is configured so that if the function library is a Win32 type library file and the current running platform of the host process matches the version of the function library, the host process directly calls the decryption function.

11. An electronic device, characterized in that: include: Processor, readable storage medium, communication bus and communication interface; in The processor, the readable storage medium and the communication interface communicate with each other via the communication bus; The readable storage medium is used to store a program for executing the multi-platform and multi-language compatible decryption library file calling method as described in any one of claims 1 to 9, and the program enables the processor to execute operations corresponding to the multi-platform and multi-language compatible decryption library file calling method.

12. A computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables the multi-platform and multi-language compatible decryption library file calling method according to any one of claims 1 to 9 to be executed.

13. A computer program product comprising a program or an instruction, wherein when the program or the instruction is executed on a computer, the multi-platform and multi-language compatible decryption library file calling method according to any one of claims 1 to 9 is executed.