File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Equivalent to CryptoStream .NET in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Equivalent to CryptoStream .NET in Java?" Watch "Equivalent to CryptoStream .NET in Java?" New topic
Author

Equivalent to CryptoStream .NET in Java?

Abhijeet Sinha
Greenhorn

Joined: Sep 15, 2011
Posts: 10
I have an encrypted string in visual basic. NET 2008, the function to decrypt is ::

[Added code tags - see UseCodeTags for details]

now I need to decrypt from java... anyone know how to do this??

Thanks!!
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 372
Matching that decryption is very easy in Java using the JCE ( http://docs.oracle.com/javase/1.5.0/docs/guide/security/CryptoSpec.html ) . If you have worked with cryptography before then you will find the specification enough but if not then you would do well to buy a book. A good introduction is given in "Beginning Cryptography with Java" written by David Hook published by Wrox.

Note - for the work you are doing PKCS7 padding is equivalent to PKCS5 padding and you should specify PKCS5Padding when creating the Cipher object.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Equivalent to CryptoStream .NET in Java?
 
Similar Threads
Java Encryption and Decryption
What broke between 1.4 and 1.6 for decryption?
Problem encrypting in Triple-DES
TripleDES compatibility (Sun - BC)
Symmetric key encryption and decryption using Rijndael algorithm