0

working in Java lately I've been using Cipher Streams, CipherInputStream and CipherOutputStream. I'm looking for similar methods of stream ciphering in C++ that I could use on the other end of a socket wrapped in a CipherStream in java.

IE:

Have a server socket in CPP with a CipherInputStream wrapping it's InputStream, have a client socket in Java with a CipherOutputStream wrapping it's OutputStream.

This way, I could encrypt the data between the two.

There are reasons that I have to use C++ server side that I can't go into right now, I'm just looking for a way to achieve what I listed above. Any help would be greatly appreciated.

Nathan F.
  • 3,250
  • 3
  • 35
  • 69
  • 2
    If you decide to use ssl on both ends then you can use [Boost Asio](http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio/overview/ssl.html)'s ssl functions. – wally Sep 28 '16 at 16:55
  • If you are committed to using the java library then you could [call the java functions](http://stackoverflow.com/a/992876/1460794) from c++. – wally Sep 28 '16 at 17:02
  • Which [Cipher](https://docs.oracle.com/javase/7/docs/api/javax/crypto/Cipher.html) are you using? – wally Sep 28 '16 at 17:09
  • He said stream cipher @flatmouse – Pavan Chandaka Sep 28 '16 at 17:12
  • @flatmouse I think that using SSL is probably going to be better than using Stream Ciphering for my purposes. If you'd like to submit it as an answer, albeit not a real answer, just a better solution, I'd be happy to accept it. – Nathan F. Sep 28 '16 at 20:27

0 Answers0