Created
November 20, 2017 19:58
-
-
Save yakivmospan/a782d836934043f0406f347d6ae53aa8 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 unWrapKey(wrappedKeyData: String, algorithm: String, wrappedKeyType: Int, keyToUnWrapWith: Key?): Key { | |
val encryptedKeyData = Base64.decode(wrappedKeyData, Base64.DEFAULT) | |
cipher.init(Cipher.UNWRAP_MODE, keyToUnWrapWith) | |
return cipher.unwrap(encryptedKeyData, algorithm, wrappedKeyType) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment