• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Object Serialization and Deserialization

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a program which is creating a key for encrypting and decrypting text in DES. The key is stored to a file using object serialization (JDK 1.3).



Now that I have this file I have given this file to someone else to use in .Net C#. They are to use this key file in order to decrypt a message that I have sent them.

Does anyone know if this is possible? Can you tell me how the data is stored to the file? I looked at the API for the ObjectOutputStream, but it is pretty vague to me.

Thanks for your help,

Trish
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

if you store your key as a serialized Java Object, the C people will not be able to use it...also if you work with different versions of java you might run into problems with serialized java objects.

perhaps you can have a look at the KeySpec interface and ins implementors (API)

there are EncodedKeySpec implementations that should help you with transforming your key to a well defined byte representation (long time i worked with security tough...)


pascal
 
Patricia Fulk
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. I will look at this. :-)
 
It's just a flesh wound! Or a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic