I need to code encryption/decryption in a java based client server application. [I am new to client/server programming]
I have a swing client which takes user id and password. On the client side, I have another class, client.java which can take userid/password and do encryption. Now, I have to do decryption. How do I call the server side class ? Also, we have to have this done by des.
Can anyone give me code samples for des encryption/decryption using Java ?
Well, as long as you don't mind passing around a byte array, you can skip the base64 encoding/decoding. You just need to alter those methods slightly to accept as a parameter/return a byte.
Just depends upon how you want to use the data you are working with. For example, writing to an XML file you might want it base64 encoded, passing to another method or somesuch then a byte would be fine.