mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-17 07:50:15 +00:00
Added insensitivity to base64 formats.
This commit is contained in:
parent
e0b5e7b808
commit
f9caab48c4
3 changed files with 5 additions and 3 deletions
|
@ -1115,7 +1115,7 @@ class StateSync {
|
|||
_remotePendingStatusUpdate[deviceInfo.publicKey.base64ToByteArray().toBase64()] = onStatusUpdate
|
||||
}
|
||||
}
|
||||
relaySession.startRelayedChannel(deviceInfo.publicKey, APP_ID, deviceInfo.pairingCode)
|
||||
relaySession.startRelayedChannel(deviceInfo.publicKey.base64ToByteArray().toBase64(), APP_ID, deviceInfo.pairingCode)
|
||||
}
|
||||
} else {
|
||||
throw e
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.futo.platformplayer.noise.protocol.CipherStatePair
|
|||
import com.futo.platformplayer.noise.protocol.DHState
|
||||
import com.futo.platformplayer.noise.protocol.HandshakeState
|
||||
import com.futo.platformplayer.states.StateSync
|
||||
import com.futo.polycentric.core.base64ToByteArray
|
||||
import com.futo.polycentric.core.toBase64
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
|
@ -82,7 +84,7 @@ class ChannelRelayed(
|
|||
override var authorizable: IAuthorizable? = null
|
||||
val isAuthorized: Boolean get() = authorizable?.isAuthorized ?: false
|
||||
var connectionId: Long = 0L
|
||||
override var remotePublicKey: String? = publicKey
|
||||
override var remotePublicKey: String? = publicKey.base64ToByteArray().toBase64()
|
||||
private set
|
||||
override var remoteVersion: Int? = null
|
||||
private set
|
||||
|
|
|
@ -998,7 +998,7 @@ class SyncSocketSession {
|
|||
suspend fun startRelayedChannel(publicKey: String, appId: UInt = 0u, pairingCode: String? = null): ChannelRelayed? {
|
||||
val requestId = generateRequestId()
|
||||
val deferred = CompletableDeferred<ChannelRelayed>()
|
||||
val channel = ChannelRelayed(this, _localKeyPair, publicKey, true)
|
||||
val channel = ChannelRelayed(this, _localKeyPair, publicKey.base64ToByteArray().toBase64(), true)
|
||||
_onNewChannel?.invoke(this, channel)
|
||||
_pendingChannels[requestId] = channel to deferred
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue