mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Qr code payload contains socket address and public key
This commit is contained in:
@@ -9,6 +9,8 @@ public interface CustodianTask {
|
||||
|
||||
void cancel();
|
||||
|
||||
void qrCodeDecoded(byte[] qrCodePayload);
|
||||
|
||||
interface Observer {
|
||||
void onStateChanged(State state);
|
||||
}
|
||||
|
||||
@@ -20,24 +20,10 @@ public interface SecretOwnerTask {
|
||||
|
||||
public static class Listening extends State {
|
||||
|
||||
private final PublicKey publicKey;
|
||||
private final InetSocketAddress socketAddress;
|
||||
private final byte[] localPayload;
|
||||
|
||||
public Listening(PublicKey publicKey,
|
||||
InetSocketAddress socketAddress) {
|
||||
this.publicKey = publicKey;
|
||||
this.socketAddress = socketAddress;
|
||||
// TODO this should also include the socket address
|
||||
this.localPayload = publicKey.getEncoded();
|
||||
}
|
||||
|
||||
public PublicKey getPublicKey() {
|
||||
return publicKey;
|
||||
}
|
||||
|
||||
public InetSocketAddress getSocketAddress() {
|
||||
return socketAddress;
|
||||
public Listening(byte[] localPayload) {
|
||||
this.localPayload = localPayload;
|
||||
}
|
||||
|
||||
public byte[] getLocalPayload() {
|
||||
|
||||
Reference in New Issue
Block a user