use of net.i2p.client.I2PClient in project i2p.i2p-bote by i2p.
the class ElGamal2048_DSA1024 method createI2PSession.
private I2PSession createI2PSession() throws KeyException {
try {
I2PClient i2pClient = I2PClientFactory.createClient();
ByteArrayOutputStream arrayStream = new ByteArrayOutputStream();
i2pClient.createDestination(arrayStream);
byte[] destinationArray = arrayStream.toByteArray();
I2PSession i2pSession = i2pClient.createSession(new ByteArrayInputStream(destinationArray), null);
return i2pSession;
} catch (Exception e) {
throw new KeyException("Can't generate I2P destination.", e);
}
}
Aggregations