Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > BOOK: Beginning Cryptography with Java
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2009, 10:40 AM
Registered User
 
Join Date: Jul 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default transferring and recieving encryted objects over a network

i had to transfer an image over network. i thought to first encrypt it.
at sender i am using:

Image image;//
Cipher c=Cipher.gentIstance("DES/CBC/KCS5padding");
SealedObject so=new SealedObject(i,c);
out.writeObject(so);//out is objectoutputstream object

at reciever:

Image image;
Cipher c=Cipher.gentIstance("DES/CBC/KCS5padding");
if((c=(Cipher)in.readObject())!=null){ //in is objectinputstream
object
image=((Image)so.getObject(c));//

}


i knows i am wrong somewhere but i actually don't understand how to use
crypto package plz help and send me correct code
 
Old July 12th, 2009, 09:28 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

The object written to the input stream is a SealedObject. It clearly won't be a Cipher when you try to read it back.

Regards,

David





Similar Threads
Thread Thread Starter Forum Replies Last Post
help in recieving fax by FAXCOMLib ahmedelmassry General .NET 3 June 23rd, 2011 09:12 AM
transferring and recieving encryted objects over a network rscrbv Pro Java 0 July 11th, 2009 10:33 AM
Transferring Objects from one page to other page. g_vamsi_krish ASP.NET 1.0 and 1.1 Basics 3 August 31st, 2006 11:15 AM
help in recieving fax by FAXCOMLib ahmedelmassry .NET Framework 2.0 0 July 26th, 2006 06:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.