Jump to content

transferring and recieving encryted objects over a network

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Nuclare2009

Nuclare2009

    Newbie

  • Members
  • Pip
  • 1 posts
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));//

}

Edited by Jaan, 26 July 2009 - 05:31 AM.
Please use code tags when you are posting your codes!


#2
ArekBulski

ArekBulski

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,376 posts
You did not ask any question. Besides, those Cipher and SealedObject classes do not exist in .NET while they do exist in Java. This is C# section.