Android中的Blowfish加密

Ser*_*gey 6 java android blowfish

cipher = Cipher.getInstance("Blowfish");
Run Code Online (Sandbox Code Playgroud)

抛出异常java.security.NoSuchAlgorithmException:找不到Cipher Blowfish实现.

我检查了local_policy.jar和US_export_policy.jar是否存在,并且从安装java时起它们没有更改.什么可能导致这个问题?

编辑:

Object[] o = Security.getAlgorithms("Cipher").toArray();
    for (int i=0; i<o.length; i++) {
        System.out.println((String)o[i]);
    }
Run Code Online (Sandbox Code Playgroud)

当我运行这段代码时,我得到的列表中没有"Blowfish",但在DES或RSA等算法名称中有一些未知的名称,如"1.2.840.113549.1.1.7"等.为什么那里没有河豚或隐藏在这些数字中?

Ser*_*gey 2

是的,我找不到解决方案,只是使用了 GNU 加密库。效果很好。