Created
March 16, 2020 04:09
-
-
Save smokelaboratory/6c6e68cc87406f994b8aec7a90fb15b4 to your computer and use it in GitHub Desktop.
Encrypt Decrypt file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //save data | |
| encryptedFile.openFileOutput().use { outputstream -> | |
| outputstream.write(et_data.text.toString().toByteArray()) | |
| } | |
| //read data | |
| encryptedFile.openFileInput().use { inputstream -> | |
| tv_result.text = String(inputstream.readBytes(), Charsets.UTF_8) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment