Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
主要增强了 AES 加解密的工具类
java.crypto.KeyGenerator
密钥生成器来生成特定于 AES 算法参数集的随机密钥,应该强制用户使用此方式生成自己的密钥,这有助于防止用户使用弱随机密钥带来的安全隐患。future:
可以考虑为密文增加完整性校验,因为 ECB 方式的特点,密文内容很容易被替换、重排、删除和重放,因此可以考虑后面支持 https 常见的带 mac 校验的 AES-GCM 算法。