adds fernet key decryption analogous to python
- first fragment currently auto-starts process to decrypt static message - token parsed from message correctly - token validation not yet sucessfull
This commit is contained in:
@ -6,6 +6,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.example.bump.MessageProcessor
|
||||
import com.maenle.bump.databinding.FragmentFirstBinding
|
||||
|
||||
/**
|
||||
@ -35,6 +36,19 @@ class FirstFragment : Fragment() {
|
||||
binding.buttonFirst.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment)
|
||||
}
|
||||
|
||||
testDecryption()
|
||||
}
|
||||
|
||||
fun testDecryption() {
|
||||
val code = "dydoes-unknowledgeable-indiscretion-househusbands-pot-walloper-indiscretion-discophorous-transcriptions-dydoes-poodle-faker-transcriptions-budlike"
|
||||
var mp = MessageProcessor()
|
||||
if(mp.codeValid(code)) {
|
||||
mp.codeSave(code)
|
||||
}
|
||||
|
||||
mp.decrypt("M1dEAxKZ5HUHCJoRkgGOvAABhqCAAAAAAGG2eKTSlKXWLDQx5B_wssZsNwsanzQID2UyUm4KKuKYKgfwH5MG2N-qzt6K4mg3pfZmWPaiDB9PiqlX236k6zo9Yvvq")
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
Reference in New Issue
Block a user