Encryption Algorithm
SecureApi provides 15 encryption algorithms, which are stored in the
CipherAlgorithmEnumenum class
AES_CBC_NO_PADDINGAES_CBC_PKCS5AES_ECB_NO_PADDINGAES_ECB_PKCS5DES_CBC_NO_PADDINGDES_CBC_PKCS5DES_ECB_NO_PADDINGDES_ECB_PKCS5DES_EDE_CBC_NO_PADDINGDES_EDE_CBC_PKCS5DES_EDE_ECB_NO_PADDINGDES_EDE_ECB_PKCS5RSA_ECB_PKCS1RSA_ECB_SHA1RSA_ECB_SHA256
Algorithms with the words
CBCand deciphers need to use both key and iv, andECBonly needs key. Each algorithm requires a different array length of key and iv characters. It is recommended to use CipherUtils introduced in the next chapter to generate key and iv.
Algorithms with the words
NO_PADDINGneed to fill the plaintext character array with an integer multiple of the length of 16 by themselves. After deciphering, remove the filled characters by yourself to get the original character string. It is not recommended to use
Except for the non-symmetric encryption at the beginning of
RSA, the rest are symmetric encryption, security:RSA>AES>DES_EDE>DES
