YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.client.SnapcastLegacyClientIds Class Reference

The client ids that builds before task 12.11 gave the servers (task 12.19), computed again from the secret of this install so that the entries they left on the servers are recognised as this phone's. More...

Collaboration diagram for de.yaacc.snapcast.client.SnapcastLegacyClientIds:
Collaboration graph

Static Public Member Functions

static String legacyId (String secret, String endpointText)
 The id of an old build: exactly the old two-argument derivation.
 
static List< String > of (String secret, List< ServerEndpoint > servers, String lastHostText)
 

Static Public Attributes

static final int MAX_IDS = 64
 The most ids returned.
 

Detailed Description

The client ids that builds before task 12.11 gave the servers (task 12.19), computed again from the secret of this install so that the entries they left on the servers are recognised as this phone's.

The old Hello id was yaacc- and the first 16 hexadecimal characters of SHA-256(secret, a zero byte, the canonical text of the endpoint the client connected to); the endpoint was the one the client checked from the typed address (SnapcastClient.check: host[:port], the stream port 1704 when there was no port), in the canonical form of ServerEndpoint#toString() (host names in lower case, IPv4 dotted, IPv6 as eight groups in brackets). That text is not stored anywhere, so the candidates are the forms the old client could have had for a known server: its host with the stream port 1704 (the choice of the server list), with the control port 1705 and with the port the list has for it, plus the address the listen test saved last (typed text, read like the old client read it). A host name the user typed for a server that the list knows by its number (or the other way round) can not be reproduced and stays unrecognised.

Pure Java. The secret is only used here and never leaves; the result is a bounded list ({@value MAX_IDS}), without duplicates, the listen test address first (it is the most likely one), then the servers in the order given.

Member Function Documentation

◆ legacyId()

static String de.yaacc.snapcast.client.SnapcastLegacyClientIds.legacyId ( String secret,
String endpointText )
static

The id of an old build: exactly the old two-argument derivation.

Parameters
secretthe secret of this install (SnapcastClientIdentity#isSecret)
endpointTextthe canonical endpoint text, such as 10.0.0.9:1704

Referenced by de.yaacc.snapcast.client.SnapcastLegacyClientIds.of().

Here is the caller graph for this function:

◆ of()

static List< String > de.yaacc.snapcast.client.SnapcastLegacyClientIds.of ( String secret,
List< ServerEndpoint > servers,
String lastHostText )
static
Parameters
secretthe install secret; anything that is not a secret gives no id
serversthe known servers (their endpoints, any port); null and null entries are skipped
lastHostTextthe address the listen test saved last, as typed; null, empty or damaged is skipped
Returns
the legacy ids this install may have on its servers, at most {@value MAX_IDS}

Referenced by de.yaacc.snapcast.client.SnapcastClientIdentities.ownIds().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: