【发布时间】:2016-01-31 04:54:25
【问题描述】:
我想实现 spring cloud encrypt RSA 密钥管理器,如下所示:
信息:ar:'{cipher}2253c8971092fdbdc9f0b8448ed760ff6790360a566e382e24925109e1b7bdc1'
我添加了classPath:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-rsa</artifactId>
</dependency>
并将 JCE8 安装在正确的位置。
在我的 bootstrap.yml 中:
加密:
密钥库:
location: classpath:microserver.jks
password: ${KEYSTORE_PASSWORD:jsk8iiu2e}
alias: serverconfig
我的问题是:
- 看起来像上面的“{cipher}2253..”,例如,如果我想 加密我的密码“123456”,目标看起来像 “{cipher}加密密码”,如何实现“123456”到“{cipher}加密密码”?
- 如果加密的“{cipher}加密密码”及以上 “入口点 密钥库“microserver.jks 已设置。我想知道什么 是解密的“关键”,如何实现?
谁能帮帮我?谢谢!
【问题讨论】:
标签: spring encryption cloud rsa