-
Solved it! Re: Problem with CryptoAPI and JCE
Figured it out .
Just in case anyone else runs into this:
1) The CryptoAPI uses CBC mode by default to set up the key. If you specify
"DES" for the key in Java, it automatically uses ECB. You have to explicitly
use the following algorithm: "DES/CBC/PKCS5Padding"
2) If you don't set the initialization vector (IV) in Java, it'll create
random output. Therefore, a Java program has to create a byte array of 8
elements all equal to 0 as its IV. This is what the CryptoAPI does by
default (see the documentation for CryptSetKeyParam).
Regards,
Jason Bock
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|