You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to port an Android method that uses SecretKeySpec and Cipher classes to take a 256 bit key and instantiate a Cipher class with AES/CBC/PKCS5PADDING transformation, from which a non-random 128 bit IV can be returned. I'm not seeing how to do the same in any iOS implementation - can you advise? val key: SecretKey = SecretKeySpec(<key>, "AES") val cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING") cipher.init(Cipher.ENCRYPT_MODE, key) val iv = Hex.bytesToStringUppercase(cipher.iv)
This discussion was converted from issue #903 on July 17, 2022 13:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to port an Android method that uses SecretKeySpec and Cipher classes to take a 256 bit key and instantiate a Cipher class with AES/CBC/PKCS5PADDING transformation, from which a non-random 128 bit IV can be returned. I'm not seeing how to do the same in any iOS implementation - can you advise?
val key: SecretKey = SecretKeySpec(<key>, "AES")
val cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING")
cipher.init(Cipher.ENCRYPT_MODE, key)
val iv = Hex.bytesToStringUppercase(cipher.iv)
Beta Was this translation helpful? Give feedback.
All reactions