diff options
Diffstat (limited to 'app/src/main/java')
3 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt index 5e722a54..8f4578cf 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt @@ -21,6 +21,7 @@ import com.github.michaelbull.result.onFailure import com.github.michaelbull.result.onSuccess import com.github.michaelbull.result.runCatching import dagger.hilt.android.AndroidEntryPoint +import dev.msfjarvis.aps.crypto.Key import dev.msfjarvis.aps.data.passfile.PasswordEntry import dev.msfjarvis.aps.injection.crypto.CryptoSet import dev.msfjarvis.aps.ui.crypto.DecryptActivityV2 @@ -132,7 +133,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() { withContext(Dispatchers.IO) { val outputStream = ByteArrayOutputStream() crypto.decrypt( - DecryptActivityV2.PRIV_KEY, + Key(DecryptActivityV2.PRIV_KEY.encodeToByteArray()), DecryptActivityV2.PASS, encryptedInput, outputStream, diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt index d7d376cc..799ca32d 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt @@ -12,6 +12,7 @@ import android.view.MenuItem import androidx.lifecycle.lifecycleScope import dagger.hilt.android.AndroidEntryPoint import dev.msfjarvis.aps.R +import dev.msfjarvis.aps.crypto.Key import dev.msfjarvis.aps.data.passfile.PasswordEntry import dev.msfjarvis.aps.data.password.FieldItem import dev.msfjarvis.aps.databinding.DecryptLayoutBinding @@ -134,7 +135,7 @@ class DecryptActivityV2 : BasePgpActivity() { val crypto = cryptos.first { it.canHandle(fullPath) } val outputStream = ByteArrayOutputStream() crypto.decrypt( - PRIV_KEY, + Key(PRIV_KEY.encodeToByteArray()), PASS, message, outputStream, diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivityV2.kt index 7bea5e49..ab5b6371 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivityV2.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivityV2.kt @@ -36,6 +36,7 @@ import com.google.zxing.integration.android.IntentIntegrator.QR_CODE import com.google.zxing.qrcode.QRCodeReader import dagger.hilt.android.AndroidEntryPoint import dev.msfjarvis.aps.R +import dev.msfjarvis.aps.crypto.Key import dev.msfjarvis.aps.data.passfile.PasswordEntry import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding import dev.msfjarvis.aps.injection.crypto.CryptoSet @@ -368,7 +369,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() { withContext(Dispatchers.IO) { val outputStream = ByteArrayOutputStream() crypto.encrypt( - listOf(PUB_KEY), + listOf(Key(PUB_KEY.encodeToByteArray())), content.byteInputStream(), outputStream, ) |