Welcome!

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

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Contributor
Posts: 11
Registered: ‎09-26-2011
My Device: a
My Carrier: a
Accepted Solution

How to use 3DES and RAS

Hi all i need write encryption and decryption using 3DES and RSA .can any one please tell me how to write this . 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to use 3DES and RAS

Have a look at the API, there are many crypto samples included. 

 

You could start looking at theese classes:

RSAEncryptorEngine
DESEncryptorEngine 

Contributor
Posts: 11
Registered: ‎09-26-2011
My Device: a
My Carrier: a

Re: How to use 3DES and RAS

yes,I checked these,but i donot understand how to ues these method ,such as encrypt(byte[] plaintext, int plaintextOffset, byte[] ciphertext, int ciphertextOffset)

can you give me an example?
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to use 3DES and RAS

[ Edited ]

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. 

Contributor
Posts: 11
Registered: ‎09-26-2011
My Device: a
My Carrier: a

Re: How to use 3DES and RAS

oh!