Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 敏感信息存储支持国密 #2055 #2096

Merged
merged 9 commits into from
Aug 1, 2023

Conversation

jsonwan
Copy link
Collaborator

@jsonwan jsonwan commented May 30, 2023

  1. 基于SDK封装对称加密服务;
  2. 支持默认+具体场景两种粒度指定加密算法;
  3. 支持通过ServiceLoader的方式自行拓展加解密方法;
  4. 支持加密算法切换。

@jsonwan jsonwan changed the title feat: 脚本执行敏感参数存储支持国密 #2055 feat: 敏感信息存储支持国密 #2055 Jun 2, 2023
@jsonwan jsonwan force-pushed the github_feature/gm branch 2 times, most recently from c09952f to 066ad29 Compare July 18, 2023 07:04
@wangyu096 wangyu096 self-requested a review July 18, 2023 07:44
jsonwan added 8 commits July 25, 2023 11:54
升级SDK版本,支持非对称加密
支持使用【加密类型】配置项指定使用经典算法/国密算法
升级SDK版本,导入导出相关场景改造
升级SDK版本,优化代码结构
@jsonwan jsonwan force-pushed the github_feature/gm branch from 066ad29 to e68f7f0 Compare July 26, 2023 01:41
@Getter
@ToString
public class CryptoException extends RuntimeException {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个类是否可以放到 common-crypto 模块中?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改为使用SDK中的CryptoException类。

}
}

public static void encrypt(InputStream in, OutputStream out, String password) throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

定义了 CryptoException, 这里可以考虑抛出 CryptoException 这种运行时异常。ASEUtils,RSAUtils 其他方法类似

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@jsonwan jsonwan merged commit 18218a5 into TencentBlueKing:master Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants