| Author |
Java / .NET rijndael File Encryption Interop
|
Ola Daniel
Ranch Hand
Joined: Jul 27, 2005
Posts: 105
|
|
I need to create a Java version of an existing .NET application which uses Xceed Encryption Library to encrypt and decrypt files. I need help on how to get a Java to encrypt and decrypt files which have been encrypted with the .NET Xceed Encryption library.
See this link here for an example of how the Xceed encryption library works: http://doc.xceedsoft.com/products/XceedCry/Encrypting_and_decrypting_from_file_to_file_%28C__example%29.html
The Xceed library creates a symmetric key using a passphrase from the user. How do I do this in Java?
I already have code which generates a random secret key, this is no good. How do I create an AES 128 bit SecretKey from a given passphrase.
Any Ideas?
|
SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
How about using SecretKeySpec?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Ola Daniel
Ranch Hand
Joined: Jul 27, 2005
Posts: 105
|
|
Is this correct way of doing it (see code below)? using PBEWithMD5AndDES for key factory? and MD5 hashing? Is it possible to use SHA-256 to generate a 128 bit hash?
|
 |
 |
|
|
subject: Java / .NET rijndael File Encryption Interop
|
|
|