How can I create RSA public key in C# using data sent by Java code?
Public key is created using this Java code:
KeyPair pair = KeyPairGenerator.getInstance("RSA").generateKeyPair();
PublicKey publicKey = pair.getPublic();
I am sending it to C# application (over network) using the following line of code:
dataOutputStream.write(publicKey.getEncoded());
This key needs to be recreated from byte[] send by Java server in C# client application receiving it - how can this be achieved?