This commit is contained in:
callebtc
2025-07-21 19:18:46 +02:00
parent 554b687ad8
commit bfb9a535ac
6 changed files with 20 additions and 19 deletions
@@ -92,7 +92,7 @@ class EncryptionService(private val context: Context) {
fun encrypt(data: ByteArray, peerID: String): ByteArray {
val encrypted = noiseService.encrypt(data, peerID)
if (encrypted == null) {
throw Exception("Failed to encrypt for $peerID - no established session")
throw Exception("Failed to encrypt for $peerID")
}
return encrypted
}
@@ -104,7 +104,7 @@ class EncryptionService(private val context: Context) {
fun decrypt(data: ByteArray, peerID: String): ByteArray {
val decrypted = noiseService.decrypt(data, peerID)
if (decrypted == null) {
throw Exception("Failed to decrypt from $peerID - no established session")
throw Exception("Failed to decrypt from $peerID")
}
return decrypted
}