1

I am completely new to android. What I wanna do is, from a given textbox, I want to get the number, encrypt it with a key stored in the android app (which increments each time the user does the encryption) and then pass the ciphertext through sha1 and then print it back on the screen. Can anybody give me some basic help?

cris
  • 79
  • 1
  • 10
  • I am not able to figure out the predefined classes for doing these operations. If I could find some sort of psuedocode which does these operations, it would be really helpful. – cris Feb 04 '11 at 11:42

1 Answers1

0

I don't understand what is incrementing, but I will give a shot.

You can use BouncyCastle (how to add bouncycastle algorithm to android) for the encryption, and then just use base64 on the SHA1 (which is weak) hash in order to have it be printable.

The only trick is how you get the key on the Android, your best bet may be to have it be generated on the device.

Community
  • 1
  • 1
James Black
  • 41,583
  • 10
  • 86
  • 166
  • There will be a counter value in the mobile. Each time the app is run, initially it will first pass the counter value through md5 and then use base64 on it. Now this value is encrypted with TDES algorithm using the key value that is input in a text box by the user. So, when the app starts, there will be a text box and a button called submit. Once this button is clicked, all these things happens and then print the final text on screen.When each time the app is run, the counter value is incremented (that is when the button is clicked).So the value going to md5 changes each time the app is run. – cris Feb 03 '11 at 21:40
  • I know it sounds awkward. This is a part of my project I am not able figure out- specially because its in android :( – cris Feb 03 '11 at 21:43