@Test void fromInviteWrongCurve() { assertThrows( IllegalArgumentException.class, () -> SecureScuttlebuttHandshakeClient.fromInvite( Bytes32.random(), new Invite("localhost", 30303, Identity.randomSECP256K1(), Signature.KeyPair.random().secretKey()))); }
public static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite) { if (!Identity.Curve.Ed25519.equals(invite.identity().curve())) { throw new IllegalArgumentException("Only ed25519 keys are supported"); } return new SecureScuttlebuttHandshakeClient( Signature.KeyPair.forSecretKey(invite.secretKey()), networkIdentifier, invite.identity().ed25519PublicKey()); }
SecureScuttlebuttHandshakeClient { public static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite) { if (!Identity.Curve.Ed25519.equals(invite.identity().curve())) { throw new IllegalArgumentException("Only ed25519 keys are supported"); } return new SecureScuttlebuttHandshakeClient( Signature.KeyPair.forSecretKey(invite.secretKey()), networkIdentifier, invite.identity().ed25519PublicKey()); } }
SecureScuttlebuttHandshakeClient { public static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite) { if (!Identity.Curve.Ed25519.equals(invite.identity().curve())) { throw new IllegalArgumentException("Only ed25519 keys are supported"); } return new SecureScuttlebuttHandshakeClient( Signature.KeyPair.forSecretKey(invite.secretKey()), networkIdentifier, invite.identity().ed25519PublicKey()); } private  SecureScuttlebuttHandshakeClient(
      Signature.KeyPair longTermKeyPair,
      Bytes32 networkIdentifier,
      Signature.PublicKey serverLongTermPublicKey); }
SecureScuttlebuttHandshakeClient { public static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite) { if (!Identity.Curve.Ed25519.equals(invite.identity().curve())) { throw new IllegalArgumentException("Only ed25519 keys are supported"); } return new SecureScuttlebuttHandshakeClient( Signature.KeyPair.forSecretKey(invite.secretKey()), networkIdentifier, invite.identity().ed25519PublicKey()); } private  SecureScuttlebuttHandshakeClient(
      Signature.KeyPair longTermKeyPair,
      Bytes32 networkIdentifier,
      Signature.PublicKey serverLongTermPublicKey); static SecureScuttlebuttHandshakeClient create(
      Signature.KeyPair ourKeyPair,
      Bytes32 networkIdentifier,
      Signature.PublicKey serverLongTermPublicKey); static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite); Bytes createHello(); void readHello(Bytes message); Bytes createIdentityMessage(); void readAcceptMessage(Bytes message); SecureScuttlebuttStreamClient createStream(); }
SecureScuttlebuttHandshakeClient { public static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite) { if (!Identity.Curve.Ed25519.equals(invite.identity().curve())) { throw new IllegalArgumentException("Only ed25519 keys are supported"); } return new SecureScuttlebuttHandshakeClient( Signature.KeyPair.forSecretKey(invite.secretKey()), networkIdentifier, invite.identity().ed25519PublicKey()); } private  SecureScuttlebuttHandshakeClient(
      Signature.KeyPair longTermKeyPair,
      Bytes32 networkIdentifier,
      Signature.PublicKey serverLongTermPublicKey); static SecureScuttlebuttHandshakeClient create(
      Signature.KeyPair ourKeyPair,
      Bytes32 networkIdentifier,
      Signature.PublicKey serverLongTermPublicKey); static SecureScuttlebuttHandshakeClient fromInvite(Bytes32 networkIdentifier, Invite invite); Bytes createHello(); void readHello(Bytes message); Bytes createIdentityMessage(); void readAcceptMessage(Bytes message); SecureScuttlebuttStreamClient createStream();  }