Created
November 20, 2017 19:57
-
-
Save yakivmospan/499af447415a4921e3260e7f27c4c0be to your computer and use it in GitHub Desktop.
This file contains 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 wrapKey(keyToBeWrapped: Key, keyToWrapWith: Key?): String { | |
cipher.init(Cipher.WRAP_MODE, keyToWrapWith) | |
val decodedData = cipher.wrap(keyToBeWrapped) | |
return Base64.encodeToString(decodedData, Base64.DEFAULT) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment