Android上是否有BouncyCastleProvider的较小版本? [英] Is there a smaller version of the BouncyCastleProvider on android?

查看:383
本文介绍了Android上是否有BouncyCastleProvider的较小版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要使用BouncyCastle库(bcprov-jdk15-143.jar)的android honeycomb应用程序。我已将此jar包含在我的libs文件夹中,并将其添加到了我的构建路径中。不幸的是,它相对较大(1.6 Megs),Eclipse将其打包到Dalvik字节码中需要花费几分钟。每次我要测试更改时,开发过程都非常缓慢,需要等待包装完成。

I'm developing an android honeycomb app that requires the use of the BouncyCastle library (bcprov-jdk15-143.jar). I've included this jar in my libs folder and added it to my build path. Unfortunately, it's relatively large (1.6 Megs) and it takes several minutes for Eclipse to package it up into Dalvik byte code. This is making it very slow to develop as each time I want to test my changes, I need to wait for the packaging to finish.

BouncyCastle的要求来自使用谷歌的谷歌电视配对协议。 http://code.google.com/p/google-tv-pairing-协议/

The requirement for BouncyCastle comes from using google's google-tv-pairing-protocol. http://code.google.com/p/google-tv-pairing-protocol/

有人能使我的生活更轻松吗?

Does anyone have any good ideas for making my life easier?

有吗?较小版本的BouncyCastle?
我可以以某种方式仅提取我需要的东西并重新包装吗?
是否有轻巧的替代方案?

Is there a smaller version of BouncyCastle? Can I somehow extract only what I need and repackage? Is there a lightweight alternative?

推荐答案


我需要等待包装完成

I need to wait for the packaging to finish

更重要的是,它可能无法正常工作。 Bouncy Castle是Android javax.crypto 实现的一部分-人们报告了将BC作为JAR添加到其项目中的种种麻烦。

More importantly, it may not work. Bouncy Castle is part of Android's implementation of javax.crypto -- people have reported all sorts of trouble trying to add BC as a JAR to their projects.

如果您可以坚持使用 javax.crypto 接口,我会这样做,并完全避免使用BC。如果没有,请尝试海绵城堡,它是将BC重新打包成单独的Java包,以避免VM问题。如果您愿意的话,也许可以找到一些方法来摆脱海绵海绵城堡中不需要的东西-由于某些原因,它比您引用的BC JAR大得多。

If you can stick with the javax.crypto interface, I would do that and avoid BC entirely. If not, try Spongy Castle, which is a repackaging of BC into a separate Java package to avoid VM issues. If you wanted, you could perhaps find ways to get rid of stuff you didn't need from your copy of Spongy Castle -- it is substantially larger than the BC JAR you cite, for some reason.

这篇关于Android上是否有BouncyCastleProvider的较小版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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