sign

suspend fun sign(host: DeviceKey, roomId: String, hostPeerId: String, joinerPeerId: String, joinerNonce: ByteArray, hostNonce: ByteArray): Challenge

The challenge host signs for the joiner joinerPeerId, answering the joinerNonce it sent with a fresh hostNonce. Its hostKey is host's DeviceKey.id.

Throws

when a nonce is not NONCE_SIZE bytes, or a string's UTF-8 is longer than a layout field can carry (65 535 bytes), or a string holds an unpaired surrogate, which has no UTF-8 and would otherwise be signed as a replacement.

when host cannot sign here.