10-13-2013 03:51 AM
I am converting an application from Android to native BlackBerry 10. The application uses AES to encrypt data. So I went looking for how to do it in BlackBerry 10 but it seems not that easy. In Java it looks like this:
byte arrayOfByte1 = HexToByte(key);
byte arrayOfByte2 = data.getBytes("UTF8");
SecretKeySpec localSecretKeySpec = new SecretKeySpec(arrayOfByte1, "AES");
Cipher localCipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
String str = Base64.encodeBytes(localCipher.doFinal(arrayOfByte
But how can I easily achieve this in BlackBerry 10? I allready tried it with downloading this example:
But how to add the padding to it? This encryption stuff is kinda hard on BB10...
Solved! Go to Solution.
10-13-2013 09:06 AM
10-14-2013 12:05 PM