The invention discloses an
encryption and decryption method capable of automatically retrieving keys and selecting algorithms, which comprises the following steps: generating a
keystore used by a cryptographic object; extracting the data characteristic of an encrypted object, thereby obtaining the processed data first
byte; according to the extracted data characteristic, automatically retrieving the
keystore; according to the data feature, selecting an
encryption algorithm; according to different
encryption scenes, carrying out user-defining on an additional expansion scheme; and performing an encryption and decryption
algorithm on the encrypted object. Based on the existing encryption
algorithm, the
keystore is used for replacing the traditional single key, so that the safety of
key management is enhanced, the key is selected according to the data characteristic, an appropriate encryption algorithm is selected to play the best encryption performance, and the additional expansion scheme can be supported to meet the specific encryption scene, therefore, the method has very high practicality and adaptability, and has very wide application scenarios.