SharedKey

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

Parameters

dependencies

the dependencies required by the SDK to be initialised.

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.