ApplicationKey

@Serializable
data class ApplicationKey

Application Keys are used to secure communications at the upper transport layer. The application key (AppKey) shall be generated using a random number generator compatible with the requirements in Volume 2, Part H, Section 2 of the Core Specification 1.

Parameters

_key

128-bit application key.

Properties

Link copied to clipboard

The boundNetKey property contains a corresponding Network Key index of the network key in the mesh network.

Link copied to clipboard

Network key to which this application key is bound to.

Link copied to clipboard

The index property contains an integer from 0 to 4095 that represents the NetKey index for this network key.

Link copied to clipboard
Link copied to clipboard

128-bit application key.

Link copied to clipboard

Human-readable name for the application functionality associated with this application key.

Link copied to clipboard
@Serializable(with = KeySerializer::class)
var oldKey: ByteArray?

OldKey property contains the previous application key.

Functions

Link copied to clipboard
fun bind(networkKey: NetworkKey)

Binds the application key to a given network key. The application key must not be in use. If any of the network Nodes already knows this key, this method throws an error

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isBoundTo(networkKeys: List<NetworkKey>): Boolean

Checks if the application key is bound to any of the given list of network keys.

fun isBoundTo(networkKey: NetworkKey): Boolean

Checks if the application key is bound to a given network key.

Link copied to clipboard
fun setKey(key: ByteArray)

Updates the existing key with the given key, if it is not in use.