ProteusClient
interface ProteusClient
Samples
import com.wire.kalium.cryptography.CryptoClientId
import com.wire.kalium.cryptography.CryptoSessionId
import com.wire.kalium.cryptography.CryptoUserID
import com.wire.kalium.cryptography.ProteusClient
fun main() {
//sampleStart
val messageData = byteArrayOf(0x42, 0x69)
val payload: ByteArray = proteusClient.encrypt(
messageData,
CryptoSessionId(cryptoUserId, cryptoClientId)
)
//sampleEnd
}
Inheritors
Functions
Link copied to clipboard
Link copied to clipboard
suspend fun ProteusClient.createSessions(preKeysCrypto: Map<String, Map<String, Map<String, PreKeyCrypto>>>)
Link copied to clipboard
abstract suspend fun <T : Any> decrypt(message: ByteArray, sessionId: CryptoSessionId, handleDecryptedMessage: suspend (decryptedMessage: ByteArray) -> T): T
Decrypts a message. In case of success, calls handleDecryptedMessage with the decrypted bytes.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun encryptBatched(message: ByteArray, sessionIds: List<CryptoSessionId>): Map<CryptoSessionId, ByteArray>
Link copied to clipboard
abstract suspend fun encryptWithPreKey(message: ByteArray, preKeyCrypto: PreKeyCrypto, sessionId: CryptoSessionId): ByteArray
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard