04-11-2009 08:00 AM
I am trying to cypher data using RSA algorithm as follows:
String eStr = "010001";
String mStr = "longlongstring";
byte e = eStr.getBytes();
byte m = mStr.getBytes();
RSACryptoSystem cs = new RSACryptoSystem();
RSAPublicKey key = new RSAPublicKey(cs, e, m);
Exception is throwed in RSACryptoSystem constructor internals is "unreported exception net.rim.device.api.crypto.UnsupportedCryptoSystemE
How can this be fixed? Probably I'm doing something wrong and there is another way to generate RSAPublicKey.
Any thoughts are appreciated.
04-12-2009 07:29 AM
I never used encryption in blackberry, but I know a bit about that and used or implemented in standard java .. But the problem is not in that
You have to surround your code with try catch like
//Your code goes here