refactor basic

WIP
This commit is contained in:
2026-03-14 00:12:51 +08:00
parent f6d9d897f6
commit 4a45474e21
35 files changed
+544 -637

No files matched your search

@@ -0,0 +1,20 @@
/*
* Copyright © 2025 RTAkland
* Author: RTAkland
* Date: 9/29/25
*/
package cn.rtast.nmdns.util
import kotlin.experimental.ExperimentalNativeApi
import kotlin.random.Random
/**
* generate random mac address
*/
@OptIn(ExperimentalNativeApi::class)
public fun randomMacAddress(): String {
val bytes = ByteArray(6) { Random.nextInt(0, 256).toByte() }
return bytes.joinToString(":") { it.toHexString() }
}