如何在 Jasypt 中使用 Blowfish 算法?

问题描述

我想在 Jasypt 中使用 Blowfish 算法进行加密。我的代码

 StandardPBEStringEncryptor standardPBEStringEncryptor = new StandardPBEStringEncryptor();
 standardPBEStringEncryptor.setPassword("some-random-data");

 //if I set algorithm as "PBEWithMD5AndTripleDES" it works
 standardPBEStringEncryptor.setAlgorithm("Blowfish");

 String encryptedValue = standardPBEStringEncryptor.encrypt("Clear Text");
 String decrypt = standardPBEStringEncryptor.decrypt(encryptedValue);

异常:

由:java.security.NoSuchAlgorithmException:Blowfish SecretKeyFactory 不可用

是否可以将 Blowfish 算法用作 Jasypt 的加密算法?

JDK 版本:15.0.1

Jasypt 版本:1.9.3

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)