• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

already written java code for encryption and decryption

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Adedeji Adedoyin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Stanley Mungai
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.ibm.com/developerworks/java/tutorials/j-sec1/
for the basics, Or you can read the E-book at
http://www.digitallibrary.kcci.com.pk/bitstream/32417747/138/1/%28ebook-pdf%29%20-%20O%27Reilly%20Java%20Cryptography.pdf

Try and try and try and never be afraid to try. If you get an issue, You will find a lot of guys here ready to help.
I hope this helps.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adedeji Adedoyin wrote:...if you could tell me how to start with java cryptography tutorials..


Recommended reading http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html
 
Stanley Mungai
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably an easy User Interactive Example to start you off you would be;

 
Stanley Mungai
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope I did Not give the Proverbial beggar A Fish.
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should be noted that a hash is generally not considered an encryption, since hashing can't be reversed.
 
Adedeji Adedoyin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 7645
178
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start with the articles Stanley and Maneesh posted; those should get you going.
 
Adedeji Adedoyin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jus want to correct a mistake...the variable name for the second string should be "plaintext2" not "plaintext"..
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please note the following words do not exists in English d, shud, dis
At least not in the context you are using them.
 
Adedeji Adedoyin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry for the mis-use of words by the use of abbreviations...henceforth,I will take note of this...thank you
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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".
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic