예제 #1
0
    public static Tuple2<PrivateNodeId, RemoteNodeAddress> generate() {
      final Tuple2<RSAPublicKey, RSAPrivateKey> kp = TrCrypto.createRsaKeyPair();

      final PrivateNodeId privateNodeId = new PrivateNodeId();
      privateNodeId.privateKey = kp.b;

      final RemoteNodeAddress remoteNodeAddress = new RemoteNodeAddress(null, kp.a);

      return Tuple2.of(privateNodeId, remoteNodeAddress);
    }