Encryption and decryption source code packet processing method, electronic equipment, storage medium and program product
By changing the strings in the first version of the encryption and decryption source code package, generating runable files and adding them to the dependencies of the target service, the problem of incompatibility of the encryption and decryption algorithms of different versions is solved, and the compatibility of the target service for the encryption and decryption source code packages is achieved, improving docking efficiency and reducing costs.
Patent Information
- Application Number
- CN202411919274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-18
AI Technical Summary
Due to incompatibility of different versions of the encryption and decryption algorithms, multiple services need to be built during data transmission to adapt to the encryption and decryption algorithm versions of different docking objects, which increases the docking cost and low efficiency.
By changing the string with the same content as the package name in the first version of the encryption and decryption source code package, the source code package after the change is generated, and the runnable file is generated based on this, and added to the dependencies of the target service, so that the target service can be compatible with different versions of the encryption and decryption source code package.
A target service can refer to different versions of encrypted and decrypted source code packages, reducing compatibility issues between docking objects, saving manpower and material resources, improving docking efficiency and reducing docking costs.
Smart Images

Figure CN119646859A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computers, and more particularly to a method for processing encryption and decryption source code packages, an electronic device, a storage medium, and a program product. Background Art
[0002] With the development of computer technology, online data transmission is prevalent in all walks of life. By adopting a pre-agreed encryption and decryption algorithm to encrypt and decrypt the data to be transmitted, it is possible to ensure the secure transmission of data and prevent the data from being illegally obtained or modified during the transmission process.
[0003] In the related technology, a service may need to transmit data with multiple docking objects. As the encryption algorithm version iterates, the versions of the encryption and decryption algorithms used by multiple docking objects may be different. Since different versions of encryption and decryption algorithms are incompatible, it is necessary to build multiple services for docking objects that use different versions of encryption and decryption algorithms, and then use different services to transmit data with docking objects based on different versions of encryption and decryption algorithms. However, this has problems such as high docking costs. Summary of the invention
[0004] The present invention provides a method for processing an encryption and decryption source code package, an electronic device, a storage medium and a program product.
[0005] According to one aspect of the present disclosure, a method for processing an encryption and decryption source code package is provided, comprising: When the package name of the first version encryption and decryption source package is the same as the package name of the second version encryption and decryption source package, a first character string in the first version encryption and decryption source package is changed to obtain a changed encryption and decryption source package, wherein the first character string is a character string with the same content as the package name; Generate a first executable file based on the changed encryption and decryption source code package; and The first executable file is added to the dependencies of the target service, wherein the target service is a service to which the second executable file generated based on the second version encryption and decryption source package is pre-added in the dependencies.
[0006] According to the encryption and decryption source code package processing method of at least one embodiment of the present disclosure, the first version of the encryption and decryption source code package includes a package path and code; The first character string in the first version encryption and decryption source code package is changed to obtain a changed encryption and decryption source code package, including: determining a second string; and The first character string in the package path and the code is completely changed to the second character string to obtain the changed encryption and decryption source code package.
[0007] According to at least one embodiment of the present disclosure, the method for processing a source code package for encryption and decryption includes: determining a second string, including: At least part of the content of the first character string is replaced with a predetermined first target character string, and the replaced first character string is used as the second character string.
[0008] According to at least one embodiment of the present disclosure, the method for processing a source code package for encryption and decryption includes: determining a second string, including: A predetermined second target character string is added at a target position of the first character string, and the added first character string is used as the second character string.
[0009] According to at least one embodiment of the present disclosure, the method for processing a source code package for encryption and decryption includes: determining a second string, including: Part of the content of the first character string is deleted, and the deleted first character string is used as the second character string.
[0010] According to at least one embodiment of the present disclosure, a method for processing an encryption and decryption source code package generates a first executable file based on the changed encryption and decryption source code package, including: Compiling the source code in the modified encryption and decryption source code package to obtain a bytecode file; and The bytecode file is packaged to obtain the first executable file.
[0011] According to at least one embodiment of the present disclosure, the encryption and decryption source code package processing method further comprises, after generating a first executable file based on the modified encryption and decryption source code package: Generate a mapping relationship between the executable file and the docking object of the target service; Among them, the mapping relationship includes the first executable file, the first docking object corresponding to the first executable file, the second executable file and the second docking object corresponding to the second executable file, the first docking object is a docking object for encrypting and decrypting data based on the first executable file, and the second docking object is a docking object for encrypting and decrypting data based on the second executable file.
[0012] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the encryption and decryption source code package processing method of any embodiment of the present disclosure.
[0013] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the encryption and decryption source code package processing method of any embodiment of the present disclosure is used to implement.
[0014] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the encryption and decryption source code package processing method of any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0016] Figure 1 It is a flowchart of a method for processing a source code package for encryption and decryption according to an embodiment of the present disclosure.
[0017] Figure 2 It is a schematic diagram of a process of changing a first character string according to an embodiment of the present disclosure.
[0018] Figure 3 It is a schematic diagram of a process of generating a first executable file according to an embodiment of the present disclosure.
[0019] Figure 4 It is a flowchart of a method for processing encryption and decryption source code packages according to another embodiment of the present invention.
[0020] Figure 5 The figure is a schematic block diagram of the structure of an encryption and decryption source code package processing device according to an embodiment of the present disclosure.
[0021] Figure 6 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0023] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] During the real estate transaction process, there will be online docking with multiple objects, such as docking with banks for second-hand mortgages and other businesses, and docking with the government for tax payment, online transfer and other businesses. The National Cryptography Algorithm (SM series algorithm), as a cryptographic algorithm standard issued by the China National Cryptography Administration, is widely used in encryption and decryption in the fields of finance, communications, and e-government. With the continuous update and version iteration of the National Cryptography Algorithm, some docking objects use the new version of the National Cryptography Package, and some docking objects use the old version of the National Cryptography Package. Since different versions of the National Cryptography Algorithm are incompatible during the encryption and decryption process, for example, data encrypted based on the new version of the National Cryptography Package cannot be decrypted based on the old version of the National Cryptography Package. Therefore, in order to successfully dock different objects, it is necessary to build services for data encryption and decryption based on the new version of the National Cryptography Package and services for data encryption and decryption based on the old version of the National Cryptography Package. It takes a long time to rebuild a service, and a lot of manpower and material resources are required during the period. In other words, there are problems such as low docking efficiency and high docking cost in the relevant technology.
[0025] To this end, the present disclosure proposes a method for processing encryption and decryption source code packages.
[0026] The encryption and decryption source code package processing method disclosed in the present invention can be used by an electronic device to add different versions of encryption and decryption source code packages that are originally incompatible to a target service, so that a target service references different versions of encryption and decryption source code packages. In the present disclosure, electronic devices include but are not limited to servers, mobile phones, tablet computers, laptops, personal computers, wearable devices, ATMs, etc.
[0027] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the encryption and decryption source code package processing method implemented in the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: National secret algorithm: refers to a series of cryptographic algorithm standards for encryption and decryption issued by the State Cryptography Administration of China, including SM1, SM2, SM3, SM4 and SM9.
[0028] Encryption and decryption source code package: refers to a software package that contains source code for implementing encryption and decryption functions.
[0029] Package name: It is a namespace used to organize classes.
[0030] Source code: refers to the original code of a computer program written in a human-readable form.
[0031] Bytecode file: A binary file generated after source code is compiled.
[0032] Executable file: A compiled and packaged binary file that can be directly run by an electronic device.
[0033] Service: refers to an independent functional unit that can provide a specific function or a set of related functions through a well-defined interface.
[0034] Dependencies: Other software components that are required for a service to be built, compiled, and run.
[0035] Compilation: refers to the process of using a compiler to generate target code from source code written in the source language.
[0036] Packaging: refers to the process of compressing one or more files (folders) using compression software.
[0037] Figure 1 FIG. 1 is a schematic diagram showing the overall process of a method M100 for processing a source code package for encryption and decryption according to an embodiment of the present disclosure. Figure 1 The method shown includes steps S110 to S130. The method can be executed by electronic devices such as a server, a mobile phone, and a computer.
[0038] Specifically, Figure 1 The methods shown include: S110, when the package name of the first version encryption and decryption source package is the same as the package name of the second version encryption and decryption source package, changing the first character string in the first version encryption and decryption source package to obtain a changed encryption and decryption source package, wherein the first character string is a character string with the same content as the package name; The first version encryption and decryption source package and the second version encryption and decryption source package may be different versions of encryption and decryption source packages released by the same organization. Exemplarily, the electronic device detects that the target organization has released the second version encryption and decryption source package, and downloads the second version encryption and decryption source package to the local electronic device. After that, the electronic device periodically detects whether the target organization has released the first version encryption and decryption source package (i.e., the new version encryption and decryption source package). If it is detected that the target organization has released the first version encryption and decryption source package, the first version encryption and decryption source package will also be downloaded to the local electronic device, and it is determined whether the package name of the first version encryption and decryption source package is the same as the package name of the second version encryption and decryption source package. Since the package name of the first version encryption and decryption source package is different from the package name of the second version encryption and decryption source package, the two encryption and decryption source packages can be directly referenced by the same service. Therefore, in this case, the first version encryption and decryption source package can be unchanged.
[0039] It is understandable that if the package names of the two versions of the encryption and decryption source code packages are the same, the service will not load the other version of the encryption and decryption source code package after loading one version of the encryption and decryption source code package, which will result in the inability to perform data encryption and decryption based on the other version of the encryption and decryption source code package during the service operation, thereby causing the service to fail to operate normally. Therefore, when the package name of the first version of the encryption and decryption source code package is the same as the package name of the second version of the encryption and decryption source code package, the target service cannot continue to load the first version of the encryption and decryption source code package when the second version of the encryption and decryption source code package has been loaded. By changing the first string (i.e., the string with the same content as the package name) in the first version of the encryption and decryption source code package, not only can the package name of the first version of the encryption and decryption source code package be cleverly modified, so that the target service that has loaded the second version of the encryption and decryption source code package can continue to load the first version of the encryption and decryption source code package after the package name is changed, but also it can ensure that the logical relationship of the source code in the encryption and decryption source code package after the change will not be wrong, and ensure that the service can operate normally after loading the encryption and decryption source code package after the change.
[0040] S120, generating a first executable file based on the changed encryption and decryption source code package; The executable file is a binary file compiled and packaged from the modified encryption and decryption source code package, which can be directly run by the electronic device. Since the code in the modified encryption and decryption source code package is still human-readable source code and cannot be directly run by the electronic device, it is necessary to generate the first executable file based on the modified encryption and decryption source code package.
[0041] S130: Add the first executable file to the dependencies of the target service, wherein the target service is a service to which the second executable file generated based on the second version encryption and decryption source code package is pre-added in the dependencies.
[0042] The first executable file is added to the dependencies of the target service, so that when the target service receives data encrypted using the first version of the encryption and decryption source code package, it can decrypt the data based on the first executable file. The target service can also encrypt data based on the first executable file and send the encrypted data to the docking object that can decrypt the data using the first version of the encryption and decryption source code package.
[0043] In the encryption and decryption source code package processing method of the disclosed embodiment, when the target service has already referenced the second executable file corresponding to the second version encryption and decryption source code package, if the first version encryption and decryption source code package appears, and the first version encryption source code package and the second version encryption source code package have the same package name, then the package name of the first version encryption and decryption source code package is changed, and then the first executable file corresponding to the changed encryption and decryption source code package is added to the dependencies of the target service. Since the package name of the changed encryption and decryption source code package is no longer the same as the package name of the second version encryption and decryption source code package, the target service can load different versions of encryption and decryption source code packages for data encryption and decryption, which is convenient for the target service to dock with docking objects that use different versions of encryption and decryption source code packages for data encryption and decryption, and there is no need to build services for docking for different docking objects, thereby saving manpower and material resources, improving docking efficiency, and reducing docking costs.
[0044] Regarding step S110, in some embodiments of the present disclosure, the first version encryption and decryption source code package includes a package path and code. Accordingly, step S110 may include the following: Figure 2 Steps S111 to S112 are shown.
[0045] S111. Determine a second character string.
[0046] The second character string may be a preset character string, or a character string generated based on the first character string or other known data or rules, which is not limited here.
[0047] S112: Change all first character strings in the package path and the code to second character strings to obtain a changed encryption and decryption source code package.
[0048] The first version of the encryption and decryption source code package may include package paths and codes of multiple classes. The package path and code of each class in the first version of the encryption and decryption source code package can be traversed, and the first string existing in the package path and the code can be changed to the second string in sequence until the first version of the encryption and decryption source code package no longer exists in the first version of the encryption and decryption source code package. The encryption and decryption source code package at this time is used as the changed encryption and decryption source code package.
[0049] The encryption and decryption source code package processing method of the above implementation only changes the character string (i.e., the first character string) that is the same as the package name, and does not change the overall logic of the source code, thereby completing the processing of the first version of the encryption and decryption source code package with minimal intrusion, while ensuring the integrity of the original encryption and decryption functions, allowing the first version of the encryption and decryption source code package to be relied upon by the target service that has already relied on the second version of the encryption and decryption source code package.
[0050] As a possible implementation, step S111 may specifically include replacing at least a portion of the first character string with a predetermined first target character string, and using the replaced first character string as the second character string.
[0051] The first target string can be determined by one or more of the first version identifier, the target service provider identifier, and the target service user identifier. For example, the first version identifier can be used as the first target string, or the target service provider identifier can be used as the first target string, or the target service user identifier can be used as the first target string, or one of the target service provider identifier and the target service user identifier can be combined with the first version identifier as the first target string. Exemplarily, the target service provider identifier is the domain name of the target service provider, and the first target string can be determined in the form of a reverse domain name. For example, if the domain name of the target service provider is assumed to be a.com, the first target string can be com.a.
[0052] In an example, the first string is org.b, where org.b is the reverse domain name of the publisher of the assumed encryption and decryption source code package, and the first target string is com.a. Then, the reverse domain name of the publisher of the encryption and decryption source code package in the first string can be replaced with the first target string to obtain the second string com.a. In this way, the second string is obtained by replacing the entire content of the first string.
[0053] In another example, the first string is org.b, where org is the top-level domain name of the publisher of the assumed encryption and decryption source code package. The top-level domain name of the publisher of the encryption and decryption source code package in the first string can be replaced with the first target string to obtain the second string ab. In this way, the second string is obtained by replacing part of the content of the first string.
[0054] The encryption and decryption source code package processing method of the above embodiment can flexibly determine the second character string by replacing at least part of the content of the first character string, thereby providing data support for the subsequent steps of the encryption and decryption source code package processing method.
[0055] Regarding step S111 , as another possible implementation, specifically, it may be: adding a predetermined second target character string at the target position of the first character string, and using the added first character string as the second character string.
[0056] The target position may be a predefined position. For example, the target position may be predefined as the start position, the end position, or any other position between the start position and the end position of the first character string.
[0057] The second target string can be determined by one or more of the first version identifier, the target service provider identifier, and the target service user identifier. For example, the first version identifier can be used as the second target string, or the target service provider identifier can be used as the second target string, or the target service user identifier can be used as the second target string, or one of the target service provider identifier and the target service user identifier can be combined with the first version identifier to form the second target string. The second target string can be the same as the first target string, or different from the first target string, which is not limited here.
[0058] The encryption and decryption source code package processing method of the above embodiment obtains the second character string by adding the second target character string to the first character string. The second character string can be flexibly determined while keeping the main part of the first character string unchanged, thereby providing data support for the subsequent steps of the encryption and decryption source code package processing method.
[0059] As another possible implementation of step S111 , specifically, part of the content of the first character string is deleted, and the deleted first character string is used as the second character string.
[0060] In the above-mentioned embodiment, the encryption and decryption source code package processing method can ensure that the encryption and decryption source code package after the second string is changed is distinguished from the second version encryption and decryption source code package, because the first string after deleting part of the content (i.e., the second string) is different from the original first string, thereby facilitating the realization of a service compatible with different versions of encryption and decryption source code packages.
[0061] Regarding step S120, in some embodiments of the present disclosure, it may include the following steps: Figure 3 Steps S121 to S122 are shown.
[0062] S121. Compile the source code in the encryption and decryption source code package after the change to obtain a bytecode file.
[0063] Exemplarily, the source code in the changed encryption and decryption source code package is a Java source code, which can be compiled into a bytecode file (.class file) by a Java compiler, thereby facilitating subsequent operation by an electronic device.
[0064] S122: Pack the bytecode file to obtain a first executable file.
[0065] For example, the bytecode file corresponding to the changed encryption and decryption source code package can be packaged into a first executable file (.jar file) through a java archive (jar) tool to facilitate deployment. The file name of the first executable file is different from the file name of the second executable file to prevent the target service from being incorrectly referenced.
[0066] The encryption and decryption source code package processing method of the above embodiment realizes automatic conversion of the changed encryption and decryption source code package into a deployable file through compilation and packaging, thereby facilitating the reference of the target service.
[0067] In some embodiments of the present disclosure, after step S120, the following may further be included: generating a mapping relationship between an executable file and a docking object of a target service; wherein the mapping relationship includes a first executable file, a first docking object corresponding to the first executable file, a second executable file, and a second docking object corresponding to the second executable file, the first docking object being a docking object for performing data encryption and decryption based on the first executable file, and the second docking object being a docking object for performing data encryption and decryption based on the second executable file.
[0068] It can be understood that the first executable file is used by the target service to encrypt and decrypt data during the data transmission process with the first docking object, and the second executable file is used by the target service to encrypt and decrypt data during the data transmission process with the second docking object. By generating a mapping relationship between executable files and docking objects, the target service can quickly and accurately determine the executable file corresponding to the docking object through the mapping relationship during the data transmission process with a certain docking object, and encrypt and decrypt data through the corresponding executable file, thereby ensuring the smooth operation of the business. In addition, establishing a mapping relationship between executable files and docking objects helps to track and manage different versions of encryption and decryption source code packages, which is convenient for subsequent maintenance, updating and troubleshooting.
[0069] Please combine Figure 4 In one example, the encryption and decryption source code package processing method may include the following steps S401 to S409. The contents related to steps S401 to S409 can refer to the description of the above implementation method. For the sake of brevity, they will not be repeated here.
[0070] In step S401, in response to detecting that the target organization has released the first version of the encryption and decryption source code package, the first version of the encryption and decryption source code package is downloaded to the local electronic device. The target organization is an organization that has previously released the second version of the encryption and decryption source code package. The local electronic device has previously downloaded the second version of the encryption and decryption source code package.
[0071] In step S402, it is determined whether the package name of the first version encryption and decryption source code package is the same as the package name of the second version encryption and decryption source code package. If so, the process proceeds to step S403; otherwise, the process proceeds to step S406.
[0072] In step S403, a first target character string is determined.
[0073] In step S404, a second character string is determined based on the first target character string. Specifically, at least part of the content of the first character string is replaced with a predetermined first target character string, and the replaced first character string is used as the second character string.
[0074] In step S405, the modified encryption and decryption source code package is determined according to the second string. Specifically, the package path and the first string in the code of the first version encryption and decryption source code package are all changed to the second string to obtain the modified encryption and decryption source code package.
[0075] In step S406, the first version encryption and decryption source code package is used as the modified encryption and decryption source code package.
[0076] In step S407, the source code in the modified encryption and decryption source code package is compiled to obtain a bytecode file.
[0077] In step S408, the bytecode file is packaged to obtain a first executable file.
[0078] In step S409, the first executable file is added to the dependencies of the target service.
[0079] Based on any of the above implementations, the present disclosure also provides an encryption and decryption source code package processing device.
[0080] Figure 5 The figure is a schematic block diagram of the structure of an encryption and decryption source code package processing device according to an embodiment of the present disclosure.
[0081] like Figure 5 As shown, the encryption and decryption source code package processing device includes: The changing module 110 is used to change the first string in the first version encryption and decryption source code package when the package name of the first version encryption and decryption source code package is the same as the package name of the second version encryption and decryption source code package, so as to obtain a changed encryption and decryption source code package, wherein the first string is a string with the same content as the package name.
[0082] The generating module 120 is used to generate a first executable file based on the modified encryption and decryption source code package.
[0083] The updating module 130 is used to add the first executable file to the dependencies of the target service, wherein the target service is a service to which the second executable file generated based on the second version encryption and decryption source package is pre-added in the dependencies.
[0084] The above-mentioned encryption and decryption source code package processing device may be in the form of computer software, and each module of the above-mentioned encryption and decryption source code package processing device may be implemented by a computer software module.
[0085] In some embodiments of the present disclosure, the first version encryption and decryption source code package includes a package path and code. Accordingly, the change module 110 is used to: determine the second string; and change all the first strings in the package path and code to the second string to obtain the changed encryption and decryption source code package.
[0086] In some embodiments of the present disclosure, the changing module 110 is used to replace at least part of the content of the first character string with a predetermined first target character string, and use the replaced first character string as the second character string.
[0087] In some embodiments of the present disclosure, the changing module 110 is used to: add a predetermined second target character string at a target position of the first character string, and use the added first character string as the second character string.
[0088] In some implementations of the present disclosure, the changing module 110 is used to delete part of the content of the first character string, and use the deleted first character string as the second character string.
[0089] In some embodiments of the present disclosure, the generation module 120 is used to: compile the source code in the modified encryption and decryption source code package to obtain a bytecode file; and package the bytecode file to obtain a first executable file.
[0090] In some embodiments of the present disclosure, the generation module 120 is used to: generate a mapping relationship between an executable file and a docking object of a target service; wherein the mapping relationship includes a first executable file, a first docking object corresponding to the first executable file, a second executable file, and a second docking object corresponding to the second executable file, the first docking object is a docking object for performing data encryption and decryption based on the first executable file, and the second docking object is a docking object for performing data encryption and decryption based on the second executable file.
[0091] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0092] The execution subject of the encryption and decryption source code package processing method in the specific implementation mode of the present disclosure may be a server, a mobile phone, a computer or other electronic device.
[0093] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the encryption and decryption source code package processing method of any of the embodiments described above in the present disclosure.
[0094] Figure 6 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0095] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0096] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0097] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0098] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0099] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0100] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0105] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0106] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for processing encryption and decryption source code packages, characterized in that: include: When the package name of the first version encryption and decryption source package is the same as the package name of the second version encryption and decryption source package, a first character string in the first version encryption and decryption source package is changed to obtain a changed encryption and decryption source package, wherein the first character string is a character string with the same content as the package name; Generate a first executable file based on the changed encryption and decryption source code package; and The first executable file is added to the dependencies of the target service, wherein the target service is a service to which the second executable file generated based on the second version encryption and decryption source package is pre-added in the dependencies.
2. The method for processing encryption and decryption source code packages according to claim 1, characterized in that: The first version encryption and decryption source code package includes a package path and code; The first character string in the first version encryption and decryption source code package is changed to obtain a changed encryption and decryption source code package, including: determining a second string; and The first character string in the package path and the code is completely changed to the second character string to obtain the changed encryption and decryption source code package.
3. The method for processing encryption and decryption source code packages according to claim 2, characterized in that: Determine the second string, including: At least part of the content of the first character string is replaced with a predetermined first target character string, and the replaced first character string is used as the second character string.
4. The method for processing encryption and decryption source code packages according to claim 2, characterized in that: Determine the second string, including: A predetermined second target character string is added at a target position of the first character string, and the added first character string is used as the second character string.
5. The method for processing encryption and decryption source code packages according to claim 2, characterized in that: Determine the second string, including: Part of the content of the first character string is deleted, and the deleted first character string is used as the second character string.
6. The method for processing encryption and decryption source code packages according to claim 1, characterized in that: Generating a first executable file based on the changed encryption and decryption source code package includes: Compiling the source code in the modified encryption and decryption source code package to obtain a bytecode file; and The bytecode file is packaged to obtain the first executable file.
7. The method for processing encryption and decryption source code packages according to any one of claims 1 to 6, characterized in that: After generating the first executable file based on the modified encryption and decryption source code package, the method further includes: Generate a mapping relationship between the executable file and the docking object of the target service; Among them, the mapping relationship includes the first executable file, the first docking object corresponding to the first executable file, the second executable file and the second docking object corresponding to the second executable file, the first docking object is a docking object for encrypting and decrypting data based on the first executable file, and the second docking object is a docking object for encrypting and decrypting data based on the second executable file.
8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the encryption and decryption source code package processing method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the encryption and decryption source code package processing method according to any one of claims 1 to 7 when executed by the processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the encryption and decryption source code package processing method described in any one of claims 1 to 7 is implemented.