How do I implement BouncyCastle RSA encryption for a BlackBerry application?
问题:
回答1:
As @itsteju points out, you can get the same functionality using the BlackBerry methods, but that does require an agreement and a royalty payment to Certicom.
Bouncy Castle maintains a J2ME compatible release on their releases page. It's not their full API, but does support RSA encryption.
As they provide source, the easiest way to integrate their RSA code into your project is to add their .java source files to your project and build. As I remember (I don't have the source readily available) they provide some classes in the java.lang package (BigInteger for example) - or at least they used to. The BlackBerry won't let your application run with these, so you'll have to rename the package and all references to it in the source you download. Note that last time I did this was a few years ago so things may have changed.
回答2:
There is standard set of methods available for RSA encryption. Check API docs for this. Those are licenced with Certicom. You need to get the keys purchased from Certicom before using RSA encryption.