【发布时间】:2017-10-29 15:03:20
【问题描述】:
所以我正在尝试使用 bouncycastle 为 Blowfish 获取密钥:
SecretKeyFactory factory =SecretKeyFactory.getInstance("Blowfish", "BC");
但它会引发以下异常:
Exception in thread "main" java.security.NoSuchAlgorithmException: no such algorithm: Blowfish for provider BC
at sun.security.jca.GetInstance.getService(GetInstance.java:87)
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:96)
at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:204)
at Main.main(Main.java:112)
我该如何解决这个问题? (当我使用“RC4”而不是“Blowfish”时也会发生这种情况,但它适用于“DES”和“AES”)
【问题讨论】:
标签: java security cryptography bouncycastle blowfish