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

The id the phone gives a snapserver in its Hello (the client id every server and every controller of it shows). More...

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

Static Public Member Functions

static String newSecret (SecureRandom random)
 A new random secret (32 hexadecimal characters) to be stored once per installation.
 
static boolean isSecret (String text)
 True for a secret as newSecret makes it.
 
static String deriveId (String secret)
 
static String idOfSecret (String secretOrNull)
 The id for a stored secret, for the code that only wants to recognise the app's own client.
 

Detailed Description

The id the phone gives a snapserver in its Hello (the client id every server and every controller of it shows).

It is derived from a random secret of this installation only: the same id for every server, also a public address (the owner's decision, task 12.11), so the app can recognise its own client in the status of a server without a session and without knowing which server it was connected to. It is never the hardware id (Android does not give one, and the design forbids it), and it is a one-way function of the secret: the server learns that two of its clients are the same phone, and that two servers saw the same phone, nothing else. Earlier builds derived the id per server (secret and endpoint text); an entry they left on a server is a ghost once, which "Remove from server" clears. Group 9's idea of replacing the secret with the YAACC device UDN was not taken.

Member Function Documentation

◆ deriveId()

static String de.yaacc.snapcast.client.SnapcastClientIdentity.deriveId ( String secret)
static
Parameters
secretthe secret of this installation (isSecret)
Returns
yaacc- and 16 hexadecimal characters: a one-way function of the secret and nothing else

Referenced by de.yaacc.snapcast.client.SnapcastClientIdentity.idOfSecret(), and de.yaacc.snapcast.client.SnapcastClientIdentities.ownIds().

Here is the caller graph for this function:

◆ idOfSecret()

static String de.yaacc.snapcast.client.SnapcastClientIdentity.idOfSecret ( String secretOrNull)
static

The id for a stored secret, for the code that only wants to recognise the app's own client.

Returns
the id, or null when there is no valid secret (the app never started a client: no entry of it can exist on a server)

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

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: