How to generate a password based key in java that matches a key generated in .NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • someCoder
    New Member
    • Sep 2007
    • 1

    #1

    How to generate a password based key in java that matches a key generated in .NET

    I'm trying to write a java program to decrypt a string that was encrypted in .NET. I'm able to decrypt it fine if I hard code the key bytes and iv bytes but I want to avoid that. I would like to be able to generate them based off a password and salt. My .NET code does this using the PasswordDeriveB ytes class. I've tried using the PBEKey classes in java but haven't had any luck matching what .NET generates. Has anybody else done something similar? Is there a java equivalent to PasswordDeriveB ytes.getBytes() ?
Working...