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

Reply
Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer

How to do encryption and decryption for password and username in blackberry

Hi All,

             I am developing an bb application in that i want to encrypt my username and paasword and save it into persistant and for another task i need to get the username and password from persistant and decrypt these.

 

can any one help me how we can do encryption and decryption in blackberry 5.0.

 

 

Thanks to All

Developer
Posts: 68
Registered: ‎11-24-2010
My Device: Not Specified

Re: How to do encryption and decryption for password and username in blackberry

Which kind of Encryption do you want to perform ?

 

1)  You can encode your user name and password with base 64 and sace it to your persistant store.

2)  You can create encryption key and store it .

 

But i am not able to get your reason to encrypt the data locally???

Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer

Re: How to do encryption and decryption for password and username in blackberry

I want use AES Encryption

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

Re: How to do encryption and decryption for password and username in blackberry

If you look at the documentation for the 'engine' for example:

http://www.blackberry.com/developers/docs/7.0.0api/net/rim/device/api/crypto/AESEncryptorEngine.html

 

You will see that there are links to sample code.  Unfortunately on the Web Site it appears these links are broken, so you can't use the online documentation to find it.  I will report this. 

 

But you should be able to use the downloaded API documentation to find these samples.