@Test public void testKeyExchange() throws Exception { final ExecutorService executor = Executors.newFixedThreadPool(2); final KeyExchange kxClient = new KeyExchange(); final KeyExchange kxServer = new KeyExchange(); Future serverResult = executor.submit(this.getKXServer(kxServer)); Future clientResult = executor.submit(this.getKXClient(kxClient)); serverResult.get(60, TimeUnit.SECONDS); clientResult.get(60, TimeUnit.SECONDS); executor.shutdownNow(); assertEquals(kxClient.getSharedKey("AES"), kxServer.getSharedKey("AES")); }
public KeyExchange() { this.paramGenerator = ParameterGeneratorImpl.getInstance(); }
KeyExchange { public KeyExchange() { this.paramGenerator = ParameterGeneratorImpl.getInstance(); } }
KeyExchange { public KeyExchange() { this.paramGenerator = ParameterGeneratorImpl.getInstance(); } KeyExchange(); }
KeyExchange { public KeyExchange() { this.paramGenerator = ParameterGeneratorImpl.getInstance(); } KeyExchange(); void exchangeKeyClientRole(final InputStream in, final OutputStream out); void exchangeKeyServerRole(final InputStream in, final OutputStream out); SecretKey getSharedKey(final String algorithm); }
KeyExchange { public KeyExchange() { this.paramGenerator = ParameterGeneratorImpl.getInstance(); } KeyExchange(); void exchangeKeyClientRole(final InputStream in, final OutputStream out); void exchangeKeyServerRole(final InputStream in, final OutputStream out); SecretKey getSharedKey(final String algorithm);  }