Created
November 1, 2017 18:20
-
-
Save yakivmospan/6f8e5372b917d3344bc769f9b21e45dc to your computer and use it in GitHub Desktop.
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
fun decrypt(data: String, key: Key?): String { | |
cipher.init(Cipher.DECRYPT_MODE, key) | |
val encryptedData = Base64.decode(data, Base64.DEFAULT) | |
val decodedData = cipher.doFinal(encryptedData) | |
return String(decodedData) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment