工程添加 AES.H AES.C 即可 在 AES.H中添加 #define AES256MODE //表示256位密码模式 不定义则为128为密码模式 AES_Encrypt(expressText , cipherText , aesKey); //加密函数 expressText: 明文16位 cipherText : 加密后密文 16位 aesKey: 密码 16位 AES_Decrypt(expressText , cipherText , aesKey);//解密函数 expressText: 解密后明文16位 cipherText : 密文 16位 aesKey: 密码 16位 KEIL 优化等级选择 level3 optimize for time 128位 加密耗时90US 解密耗时165us 256位密码 加密 125us 解密210us