QR-Codes can now be displayed after scanning.

- 2FA also supported
This commit is contained in:
2020-07-09 16:18:49 +02:00
parent a6a9d95042
commit 8865e9a394
17 changed files with 532 additions and 62 deletions

View File

@@ -0,0 +1,34 @@
package com.github.mondei1.offpass
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.Editable
import kotlinx.android.synthetic.main.activity_passphrase.*
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.runBlocking
class PassphraseActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_passphrase)
val raw: String = intent.getStringExtra("raw")!!
val qrSchema: QRSchema = QRSchema(this)
back.setOnClickListener {
finish()
}
decrypt_button.setOnClickListener {
decrypt_button.text = "Decrypting ..."
runBlocking {
qrSchema.decrypt(raw, passphrase_input.text.toString())
}
val intent: Intent = Intent(this, ViewActivity::class.java)
intent.putExtra("decrypted_raw",qrSchema.decrypted_raw)
startActivity(intent)
}
}
}