SharedKey

class SharedKey @JvmOverloads() constructor(dependencies: DittoDependencies, appID: String, sharedKey: String, siteID: BigInteger?) : 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 ID of the peer.

Constructors

SharedKey
Link copied to clipboard
fun SharedKey(dependencies: DittoDependencies, appID: String, sharedKey: String, siteID: BigInteger? = null)
the dependencies required by the SDK to be initialised.

Functions

close
Link copied to clipboard
fun close()

Properties

appID
Link copied to clipboard
val appID: String
the name of the app.
dependencies
Link copied to clipboard
val dependencies: DittoDependencies
the dependencies required by the SDK to be initialised.
sharedKey
Link copied to clipboard
val sharedKey: String
a base64-encoded DER private key.
siteID
Link copied to clipboard
val siteID: BigInteger? = null
the site ID of the peer.