Java port of MSDN X509 certificate’s usage example

Documentation of X509Certificate2 class in MSDN has example that demostrates how to use it to encrypt and decrypt stream data. Bytes in a stream are encrypted using AES symmetric algorythm. Secret key is stored in the same output stream and encrypted using X509 certificate’s public key. In order to read original contents of such stream first we […]