My system enables users to save their work as a draft. I’d like to encrypt the data before I persist it. I was working on this –
AESKey k = new AESKey();
AESEncryptorEngine a = new AESEncryptorEngine(k);
a.encrypt(byte[] data_input, int input_offset, byte[] data_output, byte[] output_offset);
I however need to persist an object. Is there a way to get a byte[] stream from an object? Also, which encryption standard should I be looking at considering the processor / memory limitations of a mobile device?
Thanks,
Teja.
You mention that you’re going to persist your object; does that mean that you intend to place it in the PersistentStore? If so, you have access to some built-in protection.
You can use a
ControlledAccessobject to prevent any access from an app without your code signing keys. You can find more information here: http://www.blackberry.com/developers/docs/4.1api/net/rim/device/api/system/ControlledAccess.html