• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Equivalent to CryptoStream .NET in Java?

 
Abhijeet Sinha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic