在Android上加载时Spongycastle缺少很多算法 [英] Spongycastle is missing many algorithms when loaded on android

查看:345
本文介绍了在Android上加载时Spongycastle缺少很多算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此StackOverflow的答案,你可以看到一个code打印所有可用的供应商和相应的算法:<一href=\"http://stackoverflow.com/questions/3683302/how-to-find-out-what-algorithm-encryption-are-supported-by-my-jvm\">How找出算法[加密],被我JVM支持?

In this stackoverflow answer you can see a code to print all available providers and corresponding algorithms: How to find out what algorithm [ encryption ] are supported by my JVM?

我使用最新版本的spongycastle的,当我要求得到Spongycastle的算法(SC)的在Android 我只得到算法屈指可数。事实上,我得到这个非常有限的名单

I am using latest version of spongycastle and when I ask to get the algorithms of Spongycastle ("SC") on android I get only a handful of algorithm. In fact I get this very limited list:

provider: SC
algorithm: PBEWITHMD5ANDDES
algorithm: PBEWITHSHA256AND192BITAES-CBC-BC
algorithm: OLDHMACSHA384
algorithm: PBEWITHHMACSHA
algorithm: PBEWITHMD5ANDDES
algorithm: PKCS12PBE
algorithm: PBEWITHSHAAND128BITAES-CBC-BC
algorithm: IES
algorithm: PKIX
algorithm: RFC3280
algorithm: ISO9797ALG3MAC
algorithm: PBEWITHHMACSHA1
algorithm: CERTIFICATE
algorithm: PBEWITHSHAAND40BITRC2-CBC
algorithm: PBEWITHSHA1ANDDES
algorithm: PBEWITHMD5AND256BITA

在另一方面,当我问让我的Linux机器SC 的交易算法我得到的更大量的算法。我没有数过,但它是一个list长10倍,一旦你看到上面。

On the other hand, when I ask to get the algos of SC on my linux machine I get a lot more algorithms. I haven't counted them but it is a list 10 times longer that the once you see above.

其中的算法,其余全部都消失了??

Where all the rest of the algorithms have gone ??

由于这个项目是不是一个典型的Andr​​oid的Java项目,但一个Android斯卡拉项目,我不得不使用的Proguard 在每次执行。这是否扮演任何角色缺少的算法,或者是其他什么东西?

Because this project is not a typical android-java project but an Android-Scala project I have to use Proguard on every execution. Does this plays any role for the missing algorithms or is it something else?

注1:我使用SC来生成一个密钥,加密与解密的OpenPGP

注2:源$ C ​​$ C测试使用的Linux机器上发挥最佳的OpenJDK-6,RSA算法的公共密钥加密和河豚算法随机对称密钥

推荐答案

您可能需要包括SpongyCastle的 OpenPGP的API罐子,所以请你包括:

You may need to include the SpongyCastle OpenPGP API jar, so check you're including that:

http://rtyley.github.com/spongycastle/#downloads

除此之外,一个ProGuard的配置问题是显而易见的竞争者。尝试指定在你的ProGuard配置文件是这样的:

Other than that, a ProGuard configuration issue would be the obvious contender. Try specifying something like this in your proguard config file:

-keep class org.spongycastle.**

这篇关于在Android上加载时Spongycastle缺少很多算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆