ditto / live.ditto / DittoIdentity / SharedKey

SharedKey

class SharedKey : DittoIdentity

An identity where every device knows the same secret key. This is a simplistic authentication mode which is normally only suitable for private apps where all the users and devices are trusted.

Parameters

appName - the name of the app, specified in domain format, e.g. "app.ditto.live". All peers must use the same app name to communicate.

sharedKey - a base64-encoded DER private key. Refer to Ditto documentation for details about generating shared keys.

siteID - the site ID for the device. For shared key mode, this can be left unspecified to choose a random number.

Constructors

<init>

An identity where every device knows the same secret key. This is a simplistic authentication mode which is normally only suitable for private apps where all the users and devices are trusted.

SharedKey(appName: String, sharedKey: String, siteID: BigInteger? = null)

Properties

appName

the name of the app, specified in domain format, e.g. "app.ditto.live". All peers must use the same app name to communicate.

val appName: String

sharedKey

a base64-encoded DER private key. Refer to Ditto documentation for details about generating shared keys.

val sharedKey: String

siteID

the site ID for the device. For shared key mode, this can be left unspecified to choose a random number.

val siteID: BigInteger?