password

fun password(value: String)

Set the password from a plain String.

Convenience alternative to assigning password as a ByteString directly.

MqttClient("sensor") {
username = "meshdev"
password("large4cats")
}

Parameters

value

The password string, encoded as UTF-8 bytes.


var password: ByteString?

Optional password as an immutable ByteString (§3.1.3.6).