SharedKey

class SharedKey @JvmOverloads constructor(    val dependencies: DittoDependencies,     val appId: String,     val sharedKey: String,     val siteId: BigInteger? = null) : DittoIdentity

A mode where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted. In this mode, any string may be used as the app id.

Parameters

dependencies

the dependencies required by the SDK to be initialised.

appId

the name of the app. 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 identifier of the peer.

Constructors

Link copied to clipboard
fun SharedKey(    dependencies: DittoDependencies,     appId: String,     sharedKey: String,     siteId: BigInteger? = null)

Functions

Link copied to clipboard
fun requiresOfflineLicenseToken(): Boolean

Properties

Link copied to clipboard
val appId: String
Link copied to clipboard
val dependencies: DittoDependencies
Link copied to clipboard
val sharedKey: String
Link copied to clipboard
val siteId: BigInteger? = null