Skip to content

Instantly share code, notes, and snippets.

@BDOMDev
Created June 26, 2019 08:27
Show Gist options
  • Save BDOMDev/2bcd06c3d26cab742ad007dc0851407c to your computer and use it in GitHub Desktop.
Save BDOMDev/2bcd06c3d26cab742ad007dc0851407c to your computer and use it in GitHub Desktop.
Encrypt a file
fun encryptDownloadedFile(filePath: String) {
val fileData = readFile(filePath)
val secretKey = getSecretKey(sharedPref)
val encodedData = encode(secretKey, fileData)
saveFile(encodedData, filePath)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment