OpenMeKit — Kotlin (Android)

Keywords

openme Android, OpenMeKit Kotlin, Android SPA library, single packet authentication Android, KnockService Android, Android knock protocol

OpenMeKit is the official Android client library for the openme Single Packet Authentication protocol.

Features

Capability Details
SPA knock Ed25519 + X25519 ECDH + HKDF-SHA256 + ChaCha20-Poly1305 over UDP
Profile storage Jetpack DataStore Preferences (app-private, no cloud sync)
YAML import Parses openme add output
QR import Parses the JSON payload from openme qr
Coroutine support KnockManager is suspend-friendly

Installation

The library is distributed as a Gradle module. Add it to your project:

settings.gradle.kts

include(":openmekit")
project(":openmekit").projectDir = file("path/to/openmekit")

app/build.gradle.kts

dependencies {
    implementation(project(":openmekit"))
}

Alternatively, publish to a local Maven repository with ./gradlew openmekit:publishToMavenLocal and depend on it as implementation("org.merlos:openmekit:1.0.0").

Quick Start

import org.merlos.openmekit.KnockManager
import org.merlos.openmekit.Profile

val profile = Profile(
    serverHost    = "myserver.example.com",
    serverUdpPort = 54154,
    serverPubKey  = Base64.decode("...", Base64.DEFAULT),
    privateKey    = Base64.decode("...", Base64.DEFAULT)
)

lifecycleScope.launch {
    val result = KnockManager.knock(profile)
    result.onSuccess { /* knocked */ }.onFailure { /* error */ }
}

KDoc Reference

The full KDoc API reference is generated by Dokka and published as part of this documentation site:

→ OpenMeKit Android KDoc Reference

To generate locally:

cd android
./gradlew openmekit:dokkaHtml
# Output: docs/android-sdk/openmekit/

See Also