already written java code for encryption and decryption
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
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.
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
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
I hope I did Not give the Proverbial beggar A Fish.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
It should be noted that a hash is generally not considered an encryption, since hashing can't be reversed.
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
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...
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
1
Start with the articles Stanley and Maneesh posted; those should get you going.
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
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...
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
Jus want to correct a mistake...the variable name for the second string should be "plaintext2" not "plaintext"..
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Please note the following words do not exists in English d, shud, dis At least not in the context you are using them.
Joanne
Adedeji Adedoyin
Greenhorn
Joined: Aug 12, 2011
Posts: 9
posted
0
I am sorry for the mis-use of words by the use of abbreviations...henceforth,I will take note of this...thank you
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".