mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-16 20:20:59 +01:00
removing redundant serializable
This commit is contained in:
parent
955c615230
commit
2162e85496
@ -1,20 +1,17 @@
|
|||||||
package app.dapk.st.matrix.message
|
package app.dapk.st.matrix.message
|
||||||
|
|
||||||
import app.dapk.st.matrix.common.*
|
import app.dapk.st.matrix.common.*
|
||||||
import kotlinx.serialization.SerialName
|
|
||||||
import kotlinx.serialization.Serializable
|
|
||||||
|
|
||||||
fun interface MessageEncrypter {
|
fun interface MessageEncrypter {
|
||||||
|
|
||||||
suspend fun encrypt(message: ClearMessagePayload): EncryptedMessagePayload
|
suspend fun encrypt(message: ClearMessagePayload): EncryptedMessagePayload
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class EncryptedMessagePayload(
|
data class EncryptedMessagePayload(
|
||||||
@SerialName("algorithm") val algorithmName: AlgorithmName,
|
val algorithmName: AlgorithmName,
|
||||||
@SerialName("sender_key") val senderKey: String,
|
val senderKey: String,
|
||||||
@SerialName("ciphertext") val cipherText: CipherText,
|
val cipherText: CipherText,
|
||||||
@SerialName("session_id") val sessionId: SessionId,
|
val sessionId: SessionId,
|
||||||
@SerialName("device_id") val deviceId: DeviceId
|
val deviceId: DeviceId
|
||||||
)
|
)
|
||||||
|
|
||||||
data class ClearMessagePayload(
|
data class ClearMessagePayload(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user