Am thinking if I could get an already written java code that can encrypt and at d same time decrypt...instead of me having to go learn how to use java's cryptography technology..
Welcome to the Ranch,
I have a ready code that encrypt and decrypt Strings and I would really like to help. But that is not the Practice here. Try a code, if it does not work , let us know what the problem is and we will surely help. We only need to see that you tried. Otherwise, Ready Made codes are just a wrong way to learn Java.....and we really want you to learn.
Give a beggar a fish; feed him for a day. Teach him how to fish; Feed him for a lifetime.
Thanks a lot sir...that sounds like the best idea..learn rather than rely on ready-made codes...
Please I would be so grateful if you could tell me how to start with java cryptography tutorials..probably you could recommend a good book that I can start with or video tutorials..thanks alot
Thank you very much to everyone that has contributed to dis thread....I am very grateful...am a first_timer right here in coderanch....and am so glad am beginning to get solutions. To problems as regards to java programming....I still will welcome many more comments on dis topic...
Thanks a lot to all those that responded earlier...I have started with the tutorial on IBM's website...and I have 2 questions to ask
1)I discoverd that different digests were created for two strings containing d same words..example
String plaintext="americanvisa";
String plaintext="americanvisa";
Produced different digest output(using toString())..why is this so?..I thought the same digest shud be generated for strings containing d same words...
2)Now..given the fact that equal strings produce different digests..then how do we really compare to knw if a data was tampered with or not...
2)Now..given the fact that equal strings produce different digests..then how do we really compare to knw if a data was tampered with or not...
Can you show us the code you are using? My wild guess is that you are not "resetting" the digest before getting the second result, in effect comparing the digest of "americanvisa" with "americanvisaamericanvisa".