首页 > 编程知识 正文

jasypt加密命令,jasypt加密算法

时间:2023-05-03 22:17:34 阅读:274217 作者:138

##使用
https://blog.csdn.net/cts529269539/article/details/79024436
maven引入jar

<dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>1.14</version></dependency>

使用jasypt.jar工具加解密

//解密java -cp jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI input="bWgq4JW/jLTBJ5kuUrR0e3s0JWEt5E7W" password=ACMP10171215 algorithm=PBEWithMD5AndDES//加密java -cp jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="bWgq4JW/jLTBJ5kuUrR0e3s0JWEt5E7W" password=ACMP10171215 algorithm=PBEWithMD5AndDES

配置文件中将原信息替换为ENC(加密后信息),例如:

password: ENC(0V5vWSDDVLxTXEmQLNDB0CahCc+gL/Dm) 运行

运行时配置解密秘钥
-Djasypt.encryptor.password=
在idea中运行


命令行启动和docker中运行参见
https://www.cnblogs.com/zz0412/p/jasypt-001.html

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。