Thank you for visiting the BlackBerry Support Community Forums.
- Kevin Michaluk, Founder, CrackBerry.com
10-13-2011 11:42 PM
10-14-2011 05:54 AM - edited 10-14-2011 05:57 AM
I thought the examples given were pretty clear. For example, the method you have given
encrypt(byte plaintext, int plaintextOffset, byte ciphertext, int ciphertextOffset)
just encrypts bytes from plaintext into ciphertext, starting at plaintextOffset putting the encrypted bytes starting at ciphertextOffset. Pretty much exactly what the JavaDoc says!
If you don't understand how to use a specific encryption algorithm, then the code will be confusing. In which case, I suggest that you review external documentation on these algorithms and they way they should be used, before looking at the code. Search the internet, there is plenty of information about these algorithms out there. And there is quite a lot to understand, with padding, and the various block approaches, that complicates the basic encryption code. And that is just 3DES!
But if you are struggling with a specific piece of code, please feel free to paste it in here and ask about it.
BTW, the code samples are linked to from each of the class pages, read the documentation at the start for links.