sign
suspend fun sign(joiner: DeviceKey, roomId: String, hostKey: DidKey, hostPeerId: String, joinerPeerId: String, deviceId: String?, hostNonce: ByteArray): AdmissionProof
The proof joiner signs to answer a challenge from hostKey at hostPeerId, carrying that challenge's hostNonce. A null deviceId is written as the empty string, so the two cannot be told apart afterwards.
Throws
when hostNonce is not Challenge.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 joiner cannot sign here.