Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Java / .NET rijndael File Encryption Interop

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 22028
108
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using SecretKeySpec?
 
Ola Daniel
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



 
Seriously Rick? Seriously? You might as well just read this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic