An encryption method and device in the transition process between old and new passwords
Through dual encryption mode and dual switch control, real-time monitoring of the configuration center switch status, solving the compatibility problem of existing data in the conversion of new and old password encryption modes, improving password security and password verification accuracy, reducing error risk, and providing emergency response Cut back mechanism and good scalability.
Patent Information
- Application Number
- CN202110935857.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-16
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-08-16
AI Technical Summary
In the banking system, during the conversion of new and old password encryption methods, the existing data may not be compatible, resulting in the failure of password verification, affecting customer experience and security.
The dual encryption method and dual switching control method are adopted to monitor the switch status on the configuration center in real time, and create a class file using the CMC client component, read and judge the password encryption method according to the switch status, so as to achieve compatibility and security of new and old passwords.
It effectively solves the problem of failing password verification in the encryption mode of new and old passwords, improves password security and password verification accuracy, reduces the risk of password errors, and provides an emergency back-cut mechanism and good scalability.
Smart Images

Figure CN113627936B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information security technology, and specifically relates to an encryption method and device in the process of transitioning from old to new passwords. Background Art
[0002] With the rapid development of Internet technology, the activities of stealing user passwords are becoming more and more rampant. IC card and account password settings are a kind of security protection barrier set up in the banking system to protect important customer information. Improving the complexity of password encryption algorithms and making passwords more difficult to crack is a means for the banking system to gradually improve customer account security. With the continuous improvement of encryption algorithms, banking systems also need to continuously encrypt and transform card and account passwords. However, during the transformation process, due to the risks of transforming existing data, the password verification of existing data may fail after the new encryption method is used. How to reduce the risk of incompatibility between the old and new passwords of existing data due to different encryption methods during the transformation process and improve customer experience is the most important issue in the encryption transformation process. Summary of the invention
[0003] The present invention can be used in the technical field of information security technology applied in finance, and can also be used in any field other than the financial field. The present invention adopts a dual encryption method and a dual switch control method to transmit and store passwords, which effectively solves the problem of failing to pass the verification of the existing encrypted passwords using the new confidentiality method during the conversion process between the old and new password encryption methods, thereby improving the security of the passwords and the accuracy of password verification.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] In a first aspect, the present invention provides an encryption method in a transition process between an old password and a new password, comprising:
[0006] Monitor the switch status on the configuration center in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively.
[0007] Use CMC client components to create class files;
[0008] Read the switch status on the configuration center according to the class file;
[0009] The user password is encrypted according to the switch state.
[0010] In one embodiment, the switch status on the real-time monitoring configuration center includes:
[0011] The switch status is monitored in real time through the onChange function.
[0012] In one embodiment, the step of reading the switch status on the configuration center according to the class file includes:
[0013] Reference the annotation class on the configuration center;
[0014] Read the cluster and namespace class of the configuration center according to the annotation class;
[0015] The switch status is read according to the cluster and the namespace class.
[0016] In one embodiment, the encryption method during the transition from the old password to the new password further includes:
[0017] Create a context based on the AnnotationConfigApplicationContext class of the toolkit in the configuration center;
[0018] Create an ApolloAnnotationBean class object;
[0019] Obtain a specific password switch parameter name according to the context and the ApolloAnnotationBean class object;
[0020] The switch state is determined according to the switch parameter name.
[0021] In a second aspect, the present invention provides an encryption device in a transition process between an old password and a new password, the device comprising:
[0022] The switch status monitoring module is used to monitor the switch status on the configuration center in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively.
[0023] A class file creation module is used to create class files using CMC client components;
[0024] A switch status reading module, used to read the switch status on the configuration center according to the class file;
[0025] The password encryption module is used to encrypt the user password according to the switch state.
[0026] In one embodiment, the switch status monitoring module includes:
[0027] The switch status monitoring unit is used to monitor the switch status in real time through the onChange function.
[0028] In one embodiment, the switch status reading module includes:
[0029] An annotation class reference unit, used to reference the annotation class on the configuration center;
[0030] A space class reading unit, used to read the cluster and namespace class of the configuration center according to the annotation class;
[0031] A switch status reading unit is used to read the switch status according to the cluster and the namespace class.
[0032] In one embodiment, the encryption device in the transition process between the old and new passwords further includes:
[0033] A context creation module, used to create a context according to the AnnotationConfigApplicationContext class of the toolkit in the configuration center;
[0034] Class object creation module, used to create ApolloAnnotationBean class objects;
[0035] A parameter name acquisition module, used to obtain a specific password switch parameter name according to the context and the ApolloAnnotationBean class object;
[0036] A switch state determination module is used to determine the switch state according to the switch parameter name.
[0037] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the encryption method in the process of transitioning from the old password to the new password are implemented.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an encryption method in a transition process between an old password and a new password.
[0039] From the above description, it can be seen that the embodiment of the present invention provides an encryption method and device in the process of transitioning from the old password to the new password. First, the switch status on the configuration center is monitored in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively; a class file is created using the CMC client component; the switch status on the configuration center is read according to the class file; and the user password is encrypted according to the switch status. The present invention effectively solves the problem that the existing encrypted password fails to pass the new confidentiality verification during the conversion process of the encryption method between the old and new passwords. Specifically, it has the following beneficial effects:
[0040] (1) Double encryption is used to transmit and store passwords, which improves the security of passwords and the accuracy of password verification.
[0041] (ii) Dual switches control the password setting and verification process, and adopt a switch pilot method to control the risks in the password modification process, reduce the risk of password errors, and provide an emergency return mechanism. When a problem occurs, the original process can be returned to in real time through the switch.
[0042] (III) Dual system password setting and verification, with switches controlling whether to follow the old and new processes for password setting and password verification. Under the premise of ensuring the normal functions of the old process for password setting and verification, the new process is piloted and promoted, and a switching mechanism between the old and new processes is provided to better ensure the integrity of the password function.
[0043] (IV) It has good scalability and provides a better protection mechanism during the continuous updating and transformation of cryptographic encryption algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.
[0045] Figure 1 The process diagram of the encryption method in the transition process between the old and new passwords in the embodiment of the present invention is shown as follows Figure 1 ;
[0046] Figure 2 is a flow chart of step 100 in an embodiment of the present invention;
[0047] Figure 3 is a flow chart of step 300 in an embodiment of the present invention;
[0048] Figure 4 The process diagram of the encryption method in the transition process between the old and new passwords in the embodiment of the present invention is shown as follows Figure 2 ;
[0049] Figure 5 It is an overall flow chart of a scheme for converting an encryption mode to a new encryption mode in a specific implementation mode of the present invention;
[0050] Figure 6 It is a flow chart of converting old passwords to new passwords by batch migration of stock data in a specific implementation mode of the present invention;
[0051] Figure 7 It is a schematic diagram of the process of encrypting passwords from the perspective of the customer in a specific implementation manner of the present invention;
[0052] Figure 8A schematic diagram of a password verification process in a specific implementation manner of the present invention;
[0053] Fig. 9 It is a UML diagram of the components for setting, changing and verifying the secret code in the program design and technical implementation in the specific implementation mode of the present invention;
[0054] Fig.10 It is a schematic diagram of a technical implementation scheme of a password switch in a specific embodiment of the present invention;
[0055] Fig.11 The block of the encryption device in the transition process between the old and new passwords in the embodiment of the present invention Figure 1 ;
[0056] Fig.12 is a block diagram of a switch state monitoring module 10 in an embodiment of the present invention;
[0057] Fig.13 is a block diagram of a switch state reading module 30 in an embodiment of the present invention;
[0058] Fig.14 The block of the encryption device in the transition process between the old and new passwords in the embodiment of the present invention Figure 2 ;
[0059] Fig.15 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention 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.
[0062] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatuses.
[0063] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0064] The embodiment of the present invention provides a specific implementation method of an encryption method in the transition process between the old and new passwords, see Figure 1 , the method specifically includes the following contents:
[0065] Step 100: Monitor the switch status on the configuration center in real time, and different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively.
[0066] From the background technology, it can be seen that in the process of password system transformation, there are risks in the transformation of existing data, which may cause the password verification of existing data to fail after adopting the new encryption method. For this reason, a technical means of setting a double switch to control the conversion between the old and new passwords is adopted, so that both encryption methods are compatible at the same time.
[0067] Step 200: Create a class file using the CMC client component.
[0068] It is understandable that Java class files are .class files generated by the javac compiler. These files have a strictly defined format. After the Java source file is compiled by the javac compiler, a corresponding binary file will be generated. Each legal Java class file has a precise definition. Java class files are binary streams of 8-bit bytes. Data items are stored in the class file in sequence, and there is no gap between adjacent items, which makes the class file compact and reduces storage space. There are many items of different sizes in the Java class file. Since the structure of each item is strictly specified, the class file can be parsed smoothly from beginning to end.
[0069] The CMC client component encapsulates the configuration used to connect to the Apollo configuration center and obtain the memory cache of the configuration center into a component package that can be used by Java. The Java class file obtains the configuration on the configuration center in real time by relying on the method introduced in the client component.
[0070] Apollo Configuration Center is an open source configuration management center developed by Ctrip's framework department. It can centrally manage the configuration of different environments and clusters of applications. After the configuration is modified, it can be pushed to the application end in real time. CMC client is a one-stop solution for unified management of the configuration management center developed based on Apollo Configuration Center, which can effectively solve the problem that Apollo Configuration Center is complex and time-consuming to execute a complete release.
[0071] Step 300: Read the switch status on the configuration center according to the class file.
[0072] Step 400: Encrypt the user password according to the switch state.
[0073] In steps 200 to 400, specifically, by introducing the CMC client component, creating a class file, specifying the corresponding cluster and namespace, reading the switch settings on the configuration center, and determining the switch status, the onChange function monitors the switch configuration status of the configuration center in real time. Once a change occurs, determine whether to switch back to the original process based on the changed switch status.
[0074] From the above description, it can be seen that the embodiment of the present invention provides an encryption method in the transition process between the old and new passwords. First, the switch status on the configuration center is monitored in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively; a class file is created using a CMC client component; the switch status on the configuration center is read according to the class file; and the user password is encrypted according to the switch status. On the one hand, the present invention realizes the control of the new and old password processes through a dual switch setting. The main technology includes: using a CMC client component to set the CMC technology switch as a new password algorithm trial switch setting. On the other hand, a system component for mutual conversion between the old and new password algorithms is provided, including a password verification component, a password setting component, and a password change component, aiming to provide a bottom-up mechanism for timely conversion to the old password process after problems occur in the new password trial. The main implementation includes: by obtaining the password offset of the new encryption algorithm, calling the password conversion component to calculate the old password offset, and returning to the original password verification process.
[0075] In one embodiment, see Figure 2 , step 100 further comprises:
[0076] Step 101: Monitor the switch status in real time through the onChange function.
[0077] It should be noted that the onChange function can only be triggered when the value changes, so it is necessary to ensure that the selected value is changed every time (especially the first time).
[0078] In one embodiment, see Figure 3 , step 300 further comprises:
[0079] Step 301: reference the annotation class on the configuration center;
[0080] Step 302: Read the cluster and namespace class of the configuration center according to the annotation class;
[0081] Step 303: Read the switch status according to the cluster and the namespace class.
[0082] In step 301 to step 303, the annotation class @ApolloConfig in the JAR package of the CMC configuration center is referenced to specify the cluster and namespace on the configuration center to be read, and the channel pilot switch is set in the cluster.
[0083] In one embodiment, see Figure 4 , the encryption methods during the transition from the old to the new password also include:
[0084] Step 500: Create a context according to the AnnotationConfigApplicationContext class of the toolkit in the configuration center;
[0085] Step 600: Create an ApolloAnnotationBean class object;
[0086] Step 700: Obtain a specific password switch parameter name according to the context and the ApolloAnnotationBean class object;
[0087] Step 800: Determine the switch state according to the switch parameter name.
[0088] In steps 500 to 800, first reference the AnnotationConfigApplicationContext class in the toolkit, create a context, and create an ApolloAnnotationBean class object to obtain the value of the specified password switch parameter name setPasswordFlag (0-off, 1-on). If setPasswordFlag is 0, the old process is used to generate the old password. Otherwise, continue to read the pilot switch parameters of the configuration center, which may include multiple parameters to determine the switch status, such as zoneNo pilot area number, brNo pilot site number, chanType pilot channel and other key element fields. If the set pilot switch conditions are met, the new encryption algorithm can be used for encryption, and a new password can be generated and stored in the database.
[0089] The present invention provides a technical means for performing batch data migration on stock data and then adopting a new encryption algorithm for secondary encryption during the transformation process between the old and new encryption methods, and setting a double switch to control the conversion between the old and new passwords, while being compatible with the two encryption methods. The present invention can ensure the accuracy of the password during the transition period between the old and new passwords, avoid the situation where the stock password adopts the new encryption method and the password error occurs, and reduce the risk of password error after the new encryption method is adopted.
[0090] In a specific implementation, the present invention takes the IC card and account password setting of a banking system as an example, and also provides a specific implementation of the encryption method during the transition process between the old and new passwords.
[0091] Figure 5 It is a general flow chart of the scheme for converting the encryption method to the new encryption method in the specific implementation mode of the present invention. Figure 5 As shown, it consists of six steps:
[0092] Step 1: For the existing password data encrypted using the old method, re-encrypt and store it using the new encryption method. Scan the existing data stored in the database through batch jobs (daily or at the end of the day), move the existing data to the new password repository, and use the new encryption algorithm to calculate the password offset for these data in batches, and store them in the new password field, while retaining the old password.
[0093] Step 2: For the plain text passwords newly set by the user through front-end operations and the modified passwords, set the channel switch (the switch has three states, including: 0-off, the old encryption algorithm is used to transmit the password, 1-on, the new encryption algorithm is used to transmit the password). If the channel switch is 0, the old encryption algorithm is still used for encryption and transmitted to the background application storage; if the channel switch is 1, only the new encryption algorithm is used for transmission and storage. Control the pilot through the switch. After the new encryption method is promoted and there is no problem with the pilot, the old password will be abolished and only the new password will be transmitted and stored.
[0094] Step 3: For the intermediate node, the encrypted password transmitted from the front end is encrypted twice to become a key. The secondary encryption algorithm also adopts the new and old encryption algorithms to transform. It also needs to support the transmission of the original encryption algorithm password and the new encryption algorithm component to generate a new password for transmission.
[0095] Step 4: The target node stores the password encrypted using a secondary encryption algorithm.
[0096] Step 5: Set the verification test switch (the switch has two states, including: 0-off, 1-on). The target node determines whether to go through the new and old password verification process based on whether the switch is on.
[0097] Step 6: After the new encryption method has been used to set passwords and verify passwords, clean up the old encryption password data.
[0098] Figure 6 The example shows a technical solution for converting old passwords to new passwords by batch migration of existing data. The steps are as follows:
[0099] First, create a batch job, set the maxNum parameter for the maximum number of queries per time, the start time startTime of the batch migration timed task, and the end time endTime. Determine whether to start the batch job based on the startTime. If the current time is between the startTime and the endTime, use multiple batch processes to query the database table according to the data rules (step A). Next, the batch program receives the data returned by the query, cyclically calls the new encryption algorithm to calculate the password offset, generates a new password, and executes the next step. Finally, call the batch program to update the database storage password to the new password, and return to step A after success.
[0100] Figure 7 For example, when setting a password, the customer enters the plain text password from the password setting transaction front end, and then transmits it through each node to encrypt the password. Figure 7 As shown, specifically including:
[0101] The customer sets the password from the front-end platform and enters the plain text password through the keyboard or other means. The switch status of the password setting channel is determined. If it is 0-parallel state of the new and old passwords, the new and old encrypted passwords coexist and the password entered by the customer is encrypted for transmission; if the switch status is 1-promote the pilot of the new password for the whole bank, that is, only the new encryption algorithm is used to encrypt and transmit the password; if the switch is 2-emergency reversal state, the original encrypted password will be transmitted and the password will be set back to the old interface.
[0102] The pilot switch is set at the intermediate node. If it is a pilot customer, the new password generation service is called, and the new encryption algorithm is used to encrypt the password and then send it to the encryption service platform. The platform generates a new password offset and updates and stores it in the database. If it is not a pilot customer, it is necessary to further determine whether the password transmitted is a new password. If it is a new password, the encryption platform calls a component to convert the new password into the old password and follow the old password setting procedure. If it is an old password, the old password setting procedure is directly followed.
[0103] The transmission password using the old encryption procedure still needs to call the password generation service at the target node, generate the old password offset according to the old encryption algorithm on the encryption platform, and update the stored password in the database to the old password offset.
[0104] Figure 8Example of password verification steps. Here, dual switches are used to control the transmission of the verification password, and the intermediate node switches between the old and new verification interfaces according to the switch settings. Figure 8 As shown, the following steps are included:
[0105] First, the customer enters the password from the front-end verification trading platform. The channel application sets the verification switch and determines the switch status. If it is on, the plain text password is encrypted with the new encryption algorithm and then transmitted. Otherwise, the old encryption algorithm is still used to encrypt and transmit the old password. At the same time, the channel reversal status is set to revert to the old verification interface.
[0106] Set the pilot switch. If it is a pilot customer, you can further determine whether the table data stores the new password offset. If so, call the new password verification service and transmit the new and old password offsets to the encryption verification service platform. The platform will perform password verification, return the verification result, and update the table data.
[0107] If it is a non-pilot customer, determine whether the new password is a new one. If it is, transmit the new password to the encryption platform, convert it into the old password on the encryption platform, and then call the old password verification transaction interface for verification. After the verification passes, update the return result.
[0108] If it is the first time for the customer to pilot, the old password verification interface will still be called for password verification, and the password verification service platform will verify the old and new passwords. If the new password passes the verification, the new password offset will be returned, the new password will be updated and saved, and the verification result will be returned.
[0109] Fig. 9 The UML diagrams of the components of setting, changing and verifying passwords in program design and technical implementation are illustrated. The collaboration and dependency between various components and upstream and downstream are reflected. The specific implementation includes the following:
[0110] (1) The service platform provides an access layer interface class to the outside world, and the implementation class organizes the logic and integrates the functions. The password part is provided by the setPassWord() method to provide password setting and verification functions.
[0111] (2) Password change component: Pass the new password, old password, area code, network number, medium number and other parameters, set the execute() method internally, and rely on the password setting component to update the password setting. The internal implementation logic is as follows: Figure 3 shown.
[0112] (3) Password setting component: Through the new password, old password, area code, network point number, medium number and other input parameters, 4 methods are set up to implement specific logical functions:
[0113] execute() method: First, it queries the CMC password setting switch to determine whether the customer is a new password pilot customer. Second, it uses different processes to set the password based on the old and new passwords passed in.
[0114] testInitPool() method: Initializes the connection verification node server, including starting the connection pool, starting the performance collection function, etc.
[0115] checkPoolStatus() method: determines whether the connection pool is normal, abnormal alarm, manual access analysis.
[0116] transfer() method: provides the function of converting specific passwords and generating new and old passwords. For the specific process, refer to Figure 3 .
[0117] (4) Password verification component: Enter the new password, old password, area code, network number, medium number, etc. There are 4 methods to implement specific logical functions:
[0118] execute() method: First, it queries the CMC password verification switch to determine whether the customer is a new password pilot customer, and then goes through different processes according to the new and old passwords passed in.
[0119] testInitPool() method: Initializes the connection verification node server, including starting the connection pool, starting the performance collection function, etc.
[0120] checkPoolStatus() method: determines whether the connection pool is normal, abnormal alarm, manual access analysis.
[0121] transfer() method: provides specific password conversion and new and old password verification functions. For specific procedures, refer to Figure 4 .
[0122] Fig.10 The technical implementation scheme of the example switch setting. By introducing the CMC client component, creating a class file, specifying the corresponding cluster and namespace, reading the switch settings on the configuration center, and judging the switch status, the onChange function monitors the switch configuration status of the configuration center in real time. Once a change occurs, determine whether to switch back to the original process based on the changed switch status. It mainly includes:
[0123] (1) ApolloAnnotationBean class: references the annotation class @ApolloConfig in the JAR package of the CMC configuration center, specifies the cluster and namespace on the configuration center to be read, and the channel pilot switch is set in this cluster.
[0124] (2) Password setting component class: reference the AnnotationConfigApplicationContext class in the toolkit, create a context, and create an ApolloAnnotationBean class object to obtain the value of the specified password setting switch parameter name setPasswordFlag (0-off, 1-on). If setPasswordFlag is 0, the old process is used to generate the old password. Otherwise, continue to read the pilot switch parameters of the configuration center, which may include multiple parameters to determine the switch status, such as zoneNo pilot area number, brNo pilot site number, chanType pilot channel and other key element fields. If the set pilot switch conditions are met, the new encryption algorithm can be used for encryption to generate a new password and store it in the database.
[0125] (3) Password verification component class: The CMC switch setting technology is also adopted. The switch parameter name is verifyPasswordFlag, and the corresponding value is: 0-off, 1-on. The other logic is consistent with the password setting component class.
[0126] (4) onChange function: By calling the CMC client toolkit, the configuration center parameters are dynamically monitored to determine the switch between the old and new processes in real time based on the changes in the configuration center switch parameters.
[0127] From the above description, it can be known that an embodiment of the present invention provides an encryption method during the transition process between the old and new passwords. First, the switch status on the configuration center is monitored in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively; a class file is created using a CMC client component; the switch status on the configuration center is read according to the class file; and the user password is encrypted according to the switch status. The present invention proposes to adopt a mode in which the old and new password encryption methods coexist through dual password fields and dual switch control, and a dual system (new and old processes) password verification method. At the same time, confidential and password-related switches are set to control the switching between the new and old passwords. The intermediate node also provides two new and old interfaces to process the password differently, and supports the conversion of the old and new passwords, thereby ensuring the accuracy of the password during the transition period between the old and new passwords, and avoiding the situation in which the existing password adopts the new encryption method and the password error occurs.
[0128] Based on the same inventive concept, the embodiments of the present application also provide an encryption device in the process of transitioning from the old to the new password, which can be used to implement the method described in the above embodiments, such as the following embodiments. Since the principle of solving the problem by the encryption device in the process of transitioning from the old to the new password is similar to the encryption method in the process of transitioning from the old to the new password, the implementation of the encryption device in the process of transitioning from the old to the new password can refer to the implementation of the encryption method in the process of transitioning from the old to the new password, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0129] The embodiment of the present invention provides a specific implementation of an encryption device in the process of transitioning from the old to the new password, which can realize the encryption method in the process of transitioning from the old to the new password. Fig.11 The encryption device during the transition from the old to the new password specifically includes the following:
[0130] The switch status monitoring module 10 is used to monitor the switch status of the configuration center in real time, and different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively;
[0131] The class file creation module 20 is used to create a class file using the CMC client component;
[0132] A switch status reading module 30, used to read the switch status on the configuration center according to the class file;
[0133] The password encryption module 40 is used to encrypt the user password according to the switch state.
[0134] In one embodiment, see Fig.12 , the switch status monitoring module 10 includes:
[0135] The switch state monitoring unit 101 is used to monitor the switch state in real time through an onChange function.
[0136] In one embodiment, see Fig.13 , the switch status reading module 30 includes:
[0137] An annotation class reference unit 301, used to reference the annotation class on the configuration center;
[0138] A space class reading unit 302 is used to read the cluster and namespace class of the configuration center according to the annotation class;
[0139] The switch status reading unit 303 is used to read the switch status according to the cluster and the namespace class.
[0140] In one embodiment, see Fig.14 , the encryption device during the transition from the old to the new password also includes:
[0141] A context creation module 50, used to create a context according to the AnnotationConfigApplicationContext class of the toolkit in the configuration center;
[0142] The class object creation module 60 is used to create an ApolloAnnotationBean class object;
[0143] A parameter name acquisition module 70, used to acquire a specific password switch parameter name according to the context and the ApolloAnnotationBean class object;
[0144] The switch state determination module 80 is used to determine the switch state according to the switch parameter name.
[0145] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all steps of the encryption method in the transition process between the old and new passwords in the above embodiment, see Fig.15 , electronic equipment specifically includes the following:
[0146] Processor (processor) 1201, memory (memory) 1202, communication interface (CommunicationsInterface) 1203 and bus 1204;
[0147] The processor 1201, the memory 1202, and the communication interface 1203 communicate with each other through the bus 1204; the communication interface 1203 is used to realize information transmission between the server device and the client device and other related devices;
[0148] The processor 1201 is used to call the computer program in the memory 1202. When the processor executes the computer program, all steps in the encryption method in the transition process between the old and new passwords in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0149] Step 100: Monitor the switch status on the configuration center in real time, and different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively;
[0150] Step 200: Create a class file using the CMC client component;
[0151] Step 300: Read the switch status on the configuration center according to the class file;
[0152] Step 400: Encrypt the user password according to the switch state.
[0153] The embodiment of the present application also provides a computer-readable storage medium capable of implementing all steps of the encryption method in the process of transitioning from the old password to the new password in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all steps of the encryption method in the process of transitioning from the old password to the new password in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0154] Step 100: Monitor the switch status on the configuration center in real time, and different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively;
[0155] Step 200: Create a class file using the CMC client component;
[0156] Step 300: Read the switch status on the configuration center according to the class file;
[0157] Step 400: Encrypt the user password according to the switch state.
[0158] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0160] Although the present application provides method operation steps such as embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0161] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0162] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0165] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0166] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0167] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.
Claims
1. An encryption method in the transition process between old and new passwords, It is characterized in that include: Monitor the switch status on the configuration center in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively. Use CMC client components to create class files; Read the switch status on the configuration center according to the class file; encrypting the user password according to the switch state; Create a context based on the AnnotationConfigApplicationContext class of the toolkit in the configuration center; Create an ApolloAnnotationBean class object; Obtain a specific password switch parameter name according to the context and the ApolloAnnotationBean class object; The switch state is determined according to the switch parameter name.
2. The encryption method in the transition process between the old and new passwords as claimed in claim 1, It is characterized in that The switch status on the real-time monitoring configuration center includes: The switch status is monitored in real time through the onChange function.
3. The encryption method in the transition process between the old and new passwords as claimed in claim 1, It is characterized in that The step of reading the switch status on the configuration center according to the class file includes: Reference the annotation class on the configuration center; Read the cluster and namespace class of the configuration center according to the annotation class; The switch status is read according to the cluster and the namespace class.
4. An encryption device during the transition from old to new passwords, It is characterized in that include: The switch status monitoring module is used to monitor the switch status on the configuration center in real time. Different switch statuses correspond to the encryption method of the new password and the encryption method of the old password respectively. A class file creation module is used to create class files using CMC client components; A switch status reading module, used to read the switch status on the configuration center according to the class file; A password encryption module, used to encrypt the user password according to the switch state; A context creation module, used to create a context according to the AnnotationConfigApplicationContext class of the toolkit in the configuration center; Class object creation module, used to create ApolloAnnotationBean class objects; A parameter name acquisition module, used to obtain a specific password switch parameter name according to the context and the ApolloAnnotationBean class object; A switch state determination module is used to determine the switch state according to the switch parameter name.
5. The encryption device in the transition process between the old and new passwords as claimed in claim 4, It is characterized in that The switch status monitoring module includes: The switch status monitoring unit is used to monitor the switch status in real time through the onChange function.
6. The encryption device in the transition process between the old and new passwords as claimed in claim 4, It is characterized in that The switch status reading module comprises: An annotation class reference unit, used to reference the annotation class on the configuration center; A space class reading unit, used to read the cluster and namespace class of the configuration center according to the annotation class; A switch status reading unit is used to read the switch status according to the cluster and the namespace class.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the encryption method in the transition process between the old and new passwords as described in any one of claims 1 to 3 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the encryption method in the transition process between the old and new passwords as described in any one of claims 1 to 3 are implemented.
