Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 9
Registered: ‎08-15-2014
My Device: Z10
My Carrier: Vodafone

AES encoding and decoding - padding

Hi Guys, to encrypt and decrypt a message I want to use AES. Mode is SB_AES_CBC. For encryption I use hu_AESEncryptMsg. What is the default padding? How can I change the padding mode? For decryption I use hu_AESDecryptMsg. The read out decrypted message is put into a „unsigned char [length of encoded vector]“. So if there are padding bytes the plain text vector is longer than the original text. I look for charcter '\0' to find the end oft he original stream. Do you suggest another method to recognize padded bytes? Reegards, BBRalle
Please use plain text.