Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, a device, and a storage medium for transmitting chat emoticons between applications.
In order to achieve the purpose, the technical scheme provided by the application is as follows:
according to a first aspect of the present application, a method for transmitting a chat emoticon between applications is provided, and is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the method includes:
responding to the operation of copying the target chat expression in the first application, and encrypting the expression file of the target chat expression by the first application through a set encryption algorithm to obtain an encrypted file;
in response to an operation of pasting the target chat emoticon into a second application authorized by the first application, the second application acquires a decryption key corresponding to the encryption algorithm;
and the second application decrypts the encrypted file by using the decryption key to obtain the expression file of the target chat expression and stores the expression file in an expression storage area of the second application.
According to a second aspect of the present application, a method for transmitting a chat emoticon between applications is provided, and is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the method includes:
receiving an instruction of transmitting a target chat emoticon in the first application to a second application authorized by the first application;
the first application encrypts the emotion file of the target chat emotion through a set encryption algorithm to obtain an encrypted file;
the second application acquires a decryption key corresponding to the encryption algorithm;
and the second application acquires the encrypted file and decrypts the encrypted file by using the decryption key to obtain the expression file of the target chat expression and stores the expression file in an expression storage area of the second application.
According to a third aspect of the present application, a method for transmitting a chat emoticon between applications is provided, which is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the method includes:
responding to the operation of copying the target chat emoticon in the first application, and encrypting the emoticon image of the target chat emoticon by the first application through a first encryption algorithm to obtain an encrypted image file;
the first application assembles the metadata of the target chat emoticons and a first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
in response to pasting the target chat emoticon into a second application authorized by the first application, the second application obtaining a second decryption key corresponding to the second encryption algorithm;
the second application decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat emotion and the first decryption key;
the second application decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
and the second application stores the emotion pictures and the metadata of the target chat emotion in an emotion storage area of the second application.
According to a fourth aspect of the present application, a method for transmitting a chat emoticon between applications is provided, and is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the method includes:
receiving an instruction of transmitting a target chat emoticon in the first application to a second application authorized by the first application;
the first application encrypts the emotion image of the target chat emotion through a first encryption algorithm to obtain an encrypted image file;
the first application assembles the metadata of the target chat emoticons and a first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
the second application acquires a second decryption key corresponding to the second encryption algorithm;
the second application decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat emotion and the first decryption key;
the second application decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
and the second application stores the emotion pictures and the metadata of the target chat emotion in an emotion storage area of the second application.
According to a fifth aspect of the present application, an apparatus for transmitting a chat emoticon between applications is provided, where the apparatus is applied to a user equipment, and the user equipment is installed with a first application and a second application, and the apparatus includes: an encryption unit, a key acquisition unit and a decryption unit;
the encryption unit responds to the operation of copying the target chat emoticon in the first application, and encrypts the emoticon file of the target chat emoticon through a set encryption algorithm to obtain an encrypted file;
the key obtaining unit is used for responding to the operation of pasting the target chat emoticons into a second application authorized by the first application, and obtaining a decryption key corresponding to the encryption algorithm;
and the decryption unit decrypts the encrypted file by using the decryption key to obtain the expression file of the target chat expression and stores the expression file in the expression storage area of the second application.
According to a sixth aspect of the present application, a device for transmitting a chat emotion between applications is provided, and is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the device includes a receiving unit, an encryption unit, a key obtaining unit, and a decryption unit;
the receiving unit receives an instruction of transmitting a target chat expression in a first application to a second application authorized by the first application;
the encryption unit encrypts the emotion file of the target chat emotion through a set encryption algorithm to obtain an encrypted file;
the key obtaining unit obtains a decryption key corresponding to the encryption algorithm;
and the decryption unit acquires the encrypted file and decrypts the encrypted file by using the decryption key to obtain the expression file of the target chat expression and stores the expression file in the expression storage area of the second application.
According to a seventh aspect of the present application, an apparatus for transmitting a chat emoticon between applications is provided, which is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the apparatus includes: the device comprises a first encryption unit, a second encryption unit, a key acquisition unit, a first decryption unit, a second decryption unit and a storage unit;
the first encryption unit responds to the operation of copying the target chat emoticon in the first application, and encrypts the emoticon of the target chat emoticon through a first encryption algorithm to obtain an encrypted emoticon file;
the second encryption unit assembles the metadata of the target chat emoticons and a first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
the key obtaining unit is used for responding to the operation of pasting the target chat emoticon into a second application authorized by the first application, and obtaining a second decryption key corresponding to the second encryption algorithm;
the first decryption unit decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat expression and a first decryption key;
the second decryption unit decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
and the storage unit stores the emotion pictures and the metadata of the target chat emotion in an emotion storage area of the second application.
According to an eighth aspect of the present application, an apparatus for transmitting a chat emoticon between applications is provided, which is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the apparatus includes: the device comprises a receiving unit, a first encryption unit, a second encryption unit, a key obtaining unit, a first decryption unit, a second decryption unit and a storage unit;
the receiving unit receives an instruction of transmitting a target chat expression in a first application to a second application authorized by the first application;
the first encryption unit encrypts the emotion pictures of the target chat emoticons through a first encryption algorithm to obtain encrypted picture files;
the second encryption unit assembles the metadata of the target chat emoticons and a first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
the key obtaining unit obtains a second decryption key corresponding to the second encryption algorithm;
the first decryption unit decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat expression and a first decryption key;
the second decryption unit decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
and the storage unit stores the emotion pictures and the metadata of the target chat emotion in an emotion storage area of the second application.
According to the technical scheme, when the chat expressions in the first application need to be shared in the second application for use, firstly, the expression file of the target chat expression which needs to be shared is encrypted through the first application, then, if the second application is an authorized application of the first application, the second application can acquire a key for decrypting the encrypted expression file and decrypt the key to obtain the expression file of the target chat expression, and finally, the second application can store the acquired expression file in the expression storage area of the second application for use by a user. It can be seen that the emotion file in the first application can be obtained and used only after the second application is authorized, and for an unauthorized application, the chat emotion of the first application cannot be used, so that the chat emotion sharing among different applications is realized on the premise of ensuring the security of the chat emotion data in each application (i.e. avoiding being illegally acquired by the outside world).
Detailed Description
At present, chat emoticons are widely applied to various types of chat software, and developers of various types of chat software can design unique chat emoticons to attract users. The chat emoticons can be classified into symbolic emoticons, static picture emoticons, dynamic picture emoticons, and the like. Generally, the chat expression is originally created by each large application software, and the chat expression of the application A is only limited to be used in the application A and cannot be generally used in the application B by the user in consideration of protection of intellectual property. However, nowadays more and more users using chat-type applications want to share original chat expressions in a certain application a to another application B for use. In order to meet this demand of the user and at the same time ensure that the original expressions of the respective large applications are not illegally used by the outside world, the following solutions are proposed.
FIG. 1 illustrates a flow of a method for transmitting chat emotions between applications, according to an example embodiment. As shown in fig. 1, the method can be applied to various types of user equipment (e.g., mobile phone, computer, PDA, etc.) that are installed with a first application and a second application. The first application and the second application can be applications with chat functions. In one embodiment, the method includes the following steps 101-108, wherein:
in step 101, in response to the operation of copying the target chat emoticon in the first application, the first application encrypts the emoticon of the target chat emoticon through a first encryption algorithm to obtain an encrypted emoticon file.
After the user performs a copy operation on the target chat emoticon in the first application, the emoticon file of the target chat emoticon needs to be read. In one embodiment, the emoticon of each chat emoticon in the application mainly includes: an emoticon (e.g., a picture of a smiling face in the format of GIF) and metadata describing attributes of the emoticon. The attributes described by the metadata may include, but are not limited to: emoji name, source, author, copyright information, grouping, unique identifier, size, etc. In an embodiment, the first Encryption algorithm may be an AES (Advanced Encryption Standard) Encryption algorithm, and the emoticon is encrypted by using the AES Encryption algorithm.
In an optional embodiment, the head data of N bytes in the emoticon of the target chat emoticon is encrypted by an AES encryption algorithm, where N is less than or equal to 256. On one hand, because the head data of the expression picture is generally the more important data of the picture, after the head data of N bytes (bytes) is encrypted, it is enough to ensure that other people cannot restore the expression picture. On the other hand, only partial data in the expression picture is encrypted, so that the time consumption of the encryption process can be effectively improved, and the processing efficiency of a computer is improved. In addition, since the AES encryption algorithm is a symmetric encryption algorithm, the encryption process and the decryption process use the same key, which may be 128 bytes of data. Of course, the above-described first encryption algorithm is not limited to the AES encryption algorithm.
In step 102, the first application stores the encrypted picture file in a specified path under a common file storage area (e.g., a file storage area common to Android systems).
In step 103, the first application assembles the metadata of the target chat emoticon, the specified path for storing the encrypted picture file, and the first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through the second encryption algorithm.
Fig. 2 is a diagram illustrating an encrypted ciphertext structure, according to an example embodiment, where the ciphertext may include a data header, metadata of a chat emoticon, a local path for storing an encrypted emoticon, and a key of a first encryption algorithm (referred to herein as a first decryption key). The data header is a mark for indicating that the second application needs to decrypt the ciphertext, and the mark is pre-agreed between the first application and the second application, that is, after the second application reads the ciphertext, whether the ciphertext needs to be decrypted or not can be identified through the data header of the ciphertext. Of course, the location of the above-mentioned marks in the ciphertext is not limiting. In other possible embodiments, the ciphertext may not include the flag.
In one embodiment, the second encryption algorithm may be an asymmetric encryption algorithm, such as: RSA, Elgamal, knapsack algorithm, Rabin, D-H, ECC (elliptic curve cryptography algorithm), etc. The asymmetric cryptographic algorithm includes a pair of pre-generated public and private keys, where the public and private keys are pre-assigned to the first and second applications, respectively. In one embodiment, the metadata, the specified path for storing the encrypted picture file, and the first decryption key may be encrypted using a public key of the RSA algorithm.
After the ciphertext is obtained by encryption, the first application may temporarily store the ciphertext in the clipboard service clipboard manager (i.e., a storage area opened in the memory).
In step 104, in response to pasting the target chat emoticon into a second application authorized by the first application, the second application obtains a second decryption key corresponding to the second encryption algorithm.
In this embodiment, the process of transmitting the chat emoticons among different applications needs to be triggered by a user in a copy + paste manner, wherein the user selects a certain emoticon in an interface of a first application and clicks a copy key, then switches to an interface of a second application, and right clicks a paste key in the interface.
Considering that the chat emotions should be protected by intellectual property rights, it is not suitable to develop the usage right of the chat emotions of the first application to any one of the other applications. To this end, an application developer of a first application may choose to collaborate with one or more collaborating application developers and conduct one-way or two-way chat emoticon use authorization. That is, on the premise that the second application is an authorized application of the first application, the second application is pre-assigned to a second decryption key of a second encryption algorithm (e.g., a private key of the RSA algorithm); otherwise, if the second application is not authorized, the second decryption key is not available.
In an embodiment, when the second application is an authorized application of the first application, a unique pair of a public key and a private key may be generated in advance and distributed to the first application and the second application, and thereafter, any user device installed with the first application may obtain the public key and any user device installed with the second application may obtain the private key. The public key and the private key may be pre-stored in a local path of the user equipment, or pre-stored in an application server, and when encryption or decryption is required, the public key or the private key is obtained from the application server. In another embodiment, to improve security, a unique pair of public and private keys may be generated for each user device on which the first and second applications are installed.
In step 105, the second application decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat emoticon and the first decryption key.
In step 106, the second application decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon.
In this embodiment, the second application reads the encrypted picture file according to the path for storing the encrypted picture file obtained by decryption in step 105, and decrypts the encrypted picture file by using the first decryption key (e.g., AES key) to obtain the emoticon.
In step 107, the encrypted picture file stored in the specified path under the common file storage area is deleted.
In step 108, the second application stores the emoticon and the metadata of the target chat emoticon in an emoticon storage area of the second application, after which the user can chat in the second application using the target chat emoticon.
Referring to fig. 3, a data reading and writing process in a user equipment is shown according to an exemplary embodiment, where after a user copies a certain target chat emoticon in a first application installed on the user equipment, the first application may encrypt the emoticon by using a preset AES key, and write the encrypted emoticon into a file storage area common to a system; then, the first application further needs to encrypt a text (such as a Json format) containing the AES key, the storage path of the encrypted expression picture, and the metadata by using a preset public key of an RSA algorithm to obtain a ciphertext (adding a corresponding data header), and write the ciphertext into a clipboard service clipboard manager; after the user pastes the target chat expression in a second application installed on the user equipment, the second application reads the ciphertext from the clipboard service clipboard manager and decrypts the ciphertext by using a private key of an RSA algorithm to obtain an AES key, a storage path of the encrypted expression picture and metadata; then, the second application reads the encrypted picture under the storage path and decrypts the encrypted picture by using the AES key to obtain the expression picture; finally, the second application stores the metadata and the expression picture into the expression storage area of the second application for use.
In other possible embodiments, the above step 102 and step 103 may be omitted. Alternatively, the encrypted picture file may be written into the clipboard service clipboard manager together with the ciphertext. Or, the encrypted picture file and the encrypted ciphertext are transmitted by other file transmission methods, including but not limited to: file sharing, inter-application communication (such as TCP), shared memory, inter-application established pipes, etc.
Through the technical scheme provided by fig. 1, when a chat expression in a first application needs to be shared in a second application for use, first, an expression file of a target chat expression that needs to be shared is encrypted by the first application, and then, if the second application is an authorized application of the first application, the second application may obtain a key for decrypting the encrypted expression file and decrypt the key to obtain an expression file of the target chat expression, and finally, the second application may store the obtained expression file in an expression storage area of the second application for use by a user. It can be seen that the emotion file in the first application can be obtained and used only after the second application is authorized, and for an unauthorized application, the chat emotion of the first application cannot be used, so that the chat emotion sharing among different applications is realized on the premise of ensuring the security of the chat emotion data in each application (i.e. avoiding being illegally acquired by the outside world).
Fig. 4 is a flowchart illustrating another method for transmitting a chat emoticon between applications according to an exemplary embodiment, and as shown in fig. 4, the method is applicable to various types of user devices (e.g., mobile phones, computers, PDAs, etc.), and the user devices are installed with a first application and a second application. The first application and the second application can be applications with chat functions. In one embodiment, the method includes the following steps 201-109, wherein:
in step 201, an instruction to transmit a target chat emoticon in the first application to a second application authorized by the first application is received.
In this embodiment, the instruction may be triggered by a specific operation of the user. The specific operation may be a single operation of the user on the user equipment, or a combination of operations consisting of a plurality of consecutive operations. For example, in one scenario, when a user needs to transmit a chat emoticon in a first application to a second application for use, the user needs to: copying operation on the target chat emoticons in the first application and pasting operation in the second application; in another scenario, the user needs to do the following: right mouse click is carried out on the target chat emoticons in the first application, other authorized applications are selected to be shared in the skipped dialog box, and then one of the multiple alternative authorized applications is selected as a second application; and so on. In yet another scenario, assuming that the authorized application of the first application is unique, the instruction may be triggered directly by double-clicking the chat emoticon with a mouse, or selecting "share to other authorized applications" in a dialog box that jumps out after right-clicking. The manner in which the instructions are triggered is not limited herein.
In step 202, the first application encrypts the emoticon of the target chat emoticon through a first encryption algorithm to obtain an encrypted emoticon file.
In step 203, the first application stores the encrypted picture file in a designated path under a common file storage area.
In step 204, the first application assembles metadata of the target chat emoticons, a path for storing the encrypted picture file, and a first decryption key corresponding to a first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm.
In step 205, the second application obtains a second decryption key corresponding to the second encryption algorithm.
In step 206, the second application decrypts the ciphertext using the second decryption key to obtain the metadata of the target chat emoticon and the first decryption key.
In step 207, the second application decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon.
In step 208, the encrypted picture file stored in the specified path under the common file storage area is deleted.
In step 209, the second application stores the emoticon and the metadata of the target chat emoticon in an emoticon storage area of the second application.
The above steps 202 to 209 can refer to the details of the above steps 101 to 108, and are not described herein again.
Fig. 5 is a flowchart illustrating a further method for transmitting a chat emoticon between applications according to an exemplary embodiment, and as shown in fig. 5, the method is applicable to various types of user devices (e.g., mobile phones, computers, PDAs, etc.), and the user devices are installed with a first application and a second application. The first application and the second application can be applications with chat functions. In one embodiment, the method includes the following steps 301-303, wherein:
in step 301, in response to the operation of copying the target chat emoticon in the first application, the first application encrypts the emoticon file of the target chat emoticon by using a set encryption algorithm to obtain an encrypted file.
In an embodiment, the emotion file may be an emotion picture. In another embodiment, the emoticon may include an emoticon and metadata describing attributes of the emoticon.
In step 302, in response to pasting the target chat emoticon into a second application authorized by the first application, the second application obtains a decryption key corresponding to the encryption algorithm.
In an alternative embodiment, the encryption algorithm is an asymmetric encryption algorithm (such as RSA), and a public key and a private key corresponding to the asymmetric encryption algorithm are respectively distributed to the first application and the second application.
In step 303, the second application decrypts the encrypted file by using the decryption key to obtain the emotion file of the target chat emotion, and stores the emotion file in the emotion storage area of the second application for subsequent use.
Through the technical scheme provided by fig. 5, the emoticon in the first application can be obtained and used only after the second application is authorized, and for an unauthorized application, the chat emoticon of the first application cannot be used, so that the chat emoticon can be shared among different applications on the premise of ensuring the security of the chat emoticon data in each application (i.e., avoiding being illegally acquired by the outside world).
Fig. 6 is a flowchart illustrating a further method for transmitting a chat emoticon between applications according to an exemplary embodiment, where the method is applicable to various types of user devices (e.g., mobile phones, computers, PDAs, etc.) installed with a first application and a second application, as shown in fig. 6. The first application and the second application can be applications with chat functions. In one embodiment, the method includes steps 401-404, wherein:
in step 401, an instruction to transmit a target chat emoticon in the first application to a second application authorized by the first application is received.
In this embodiment, the instruction may be triggered by a specific operation of the user. The specific operation may be a single operation of the user on the user equipment, or a combination of operations consisting of a plurality of consecutive operations.
In step 402, the first application encrypts the emotion file of the target chat emotion through a set encryption algorithm to obtain an encrypted file.
In an embodiment, the emotion file may be an emotion picture. In another embodiment, the emoticon may include an emoticon and metadata describing attributes of the emoticon.
In step 403, the second application obtains a decryption key corresponding to the encryption algorithm.
In an alternative embodiment, the encryption algorithm is an asymmetric encryption algorithm (such as RSA), and a public key and a private key corresponding to the asymmetric encryption algorithm are respectively distributed to the first application and the second application.
In step 404, the second application obtains the encrypted file and decrypts the encrypted file by using the decryption key to obtain the emotion file of the target chat emotion and stores the emotion file in the emotion storage area of the second application.
Through the technical scheme provided by fig. 6, the emoticon in the first application can be obtained and used only after the second application is authorized, and for an unauthorized application, the chat emoticon of the first application cannot be used, so that the chat emoticon can be shared among different applications on the premise of ensuring the security of the chat emoticon data in each application (i.e., avoiding being illegally acquired by the outside world).
Fig. 7 illustrates a hardware configuration of an electronic device according to an exemplary embodiment. Referring to fig. 7, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a storage (including a memory and a non-volatile storage), and may also include hardware required by other services. Wherein, the storage can store the relevant logic (i.e. computer program) for realizing the transmission of the chat emoticons among the applications, and the processor can read the corresponding computer program from the nonvolatile storage into the memory and then run the computer program. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
As shown in fig. 8, in an embodiment, an apparatus 300 for transmitting a chat emoticon between applications is applied to a user equipment, the user equipment is installed with a first application and a second application, and the apparatus 300 includes: an encryption unit 501, a key acquisition unit 502, and a decryption unit 503; the encryption unit 501 may exist in a first application, and the key obtaining unit 502 and the decryption unit 503 may exist in a second application. Specifically, the method comprises the following steps:
in response to an operation of copying a target chat emotion in a first application, the encryption unit 501 encrypts an emotion file of the target chat emotion through a set encryption algorithm to obtain an encrypted file;
the key obtaining unit 502 obtains a decryption key corresponding to the encryption algorithm in response to an operation of pasting the target chat emoticon into a second application authorized by the first application;
the decryption unit 503 decrypts the encrypted file by using the decryption key to obtain an emotion file of the target chat emotion and stores the emotion file in the emotion storage area of the second application.
As shown in fig. 9, in an embodiment, an apparatus 600 for transmitting a chat emoticon between applications is applied to a user equipment, the user equipment is provided with a first application and a second application, and the apparatus 600 includes a receiving unit 601, an encrypting unit 602, a key obtaining unit 603, and a decrypting unit 604; the encryption unit 602 may exist in a first application, and the key obtaining unit 603 and the decryption unit 604 may exist in a second application. Specifically, the method comprises the following steps:
the receiving unit 601 receives an instruction for transmitting a target chat emoticon in a first application to a second application authorized by the first application;
the encryption unit 602 encrypts the emotion file of the target chat emotion through a set encryption algorithm to obtain an encrypted file;
the key acquisition unit 603 acquires a decryption key corresponding to the encryption algorithm;
the decryption unit 604 obtains the encrypted file and decrypts the encrypted file by using the decryption key to obtain the emotion file of the target chat emotion and stores the emotion file in the emotion storage area of the second application.
As shown in fig. 10, in an embodiment, an apparatus 700 for transmitting a chat emoticon between applications is applied to a user equipment, the user equipment being installed with a first application and a second application, the apparatus 700 includes: a first encryption unit 701, a second encryption unit 702, a key acquisition unit 703, a first decryption unit 704, a second decryption unit 705, and a storage unit 706; the first encryption unit 701 and the second encryption unit 702 may exist in a first application, and the key acquisition unit 703, the first decryption unit 704, the second decryption unit 705, and the storage unit 706 may exist in a second application. Specifically, the method comprises the following steps:
the first encryption unit 701 responds to an operation of copying a target chat emotion in a first application, and encrypts an emotion image of the target chat emotion through a first encryption algorithm to obtain an encrypted image file;
the second encryption unit 702 assembles the metadata of the target chat emoticon and the first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
the key obtaining unit 703 obtains a second decryption key corresponding to the second encryption algorithm in response to an operation of pasting the target chat emoticon into a second application authorized by the first application;
the first decryption unit 704 decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat emotion and a first decryption key;
the second decryption unit 705 decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
the storage unit 706 stores the emoticon and the metadata of the target chat emoticon in an emoticon storage area of the second application.
As shown in fig. 11, in an embodiment, an apparatus 800 for transmitting a chat emoticon between applications is applied to a user equipment, where the user equipment is installed with a first application and a second application, and the apparatus 800 includes: a receiving unit 801, a first encryption unit 802, a second encryption unit 803, a key acquisition unit 804, a first decryption unit 805, a second decryption unit 806, and a storage unit 807; the first encryption unit 802 and the second encryption unit 803 may be present in a first application, and the key obtaining unit 804, the first decryption unit 805, the second decryption unit 806, and the storage unit 807 may be present in a second application. Specifically, the method comprises the following steps:
a receiving unit 801 receives an instruction to transmit a target chat emoticon in a first application to a second application authorized by the first application;
the first encryption unit 802 encrypts the emoticon of the target chat emoticon through a first encryption algorithm to obtain an encrypted emoticon file;
the second encryption unit 803 assembles the metadata of the target chat emoticon and the first decryption key corresponding to the first encryption algorithm into a text to be encrypted, and encrypts the text to be encrypted into a ciphertext through a second encryption algorithm;
the key obtaining unit 804 obtains a second decryption key corresponding to the second encryption algorithm;
the first decryption unit 805 decrypts the ciphertext by using the second decryption key to obtain the metadata of the target chat emotion and the first decryption key;
the second decryption unit 806 decrypts the encrypted picture file by using the first decryption key to obtain the emoticon of the target chat emoticon;
the storage unit 807 stores the emoticon and the metadata of the target chat emoticon in an emoticon storage area of the second application.
The steps implemented when the computer program is executed by the processor may refer to the description of the method embodiments above, and the contents of the apparatus embodiments and the contents of the method embodiments may be complementary to each other without conflict, and will not be described again.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.