1

I have this code in Java:

Key key = new SecretKeySpec(keyValue, "AES");

I want to port this code to objective-c?

swiftBoy
  • 35,607
  • 26
  • 136
  • 135
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
  • I don't understand mutch about objective c but I found this code that generates an AES key give it a try http://stackoverflow.com/a/23534490/5467727 – Tiago Oliveira Aug 28 '16 at 12:30
  • If the given answer solved your problem, you may [accept](http://meta.stackexchange.com/q/5234/266187) it. If it didn't, then please expand on what is wrong. – Artjom B. Sep 24 '16 at 08:16

1 Answers1

0

Key and SecretKeySpec are simple container types for Java's . They don't have corresponding types in Objective-C (CommonCrypto). keyValue is a simple byte[] that corresponds to a byte array in Objective-C which you can use there.

Artjom B.
  • 61,146
  • 24
  • 125
  • 222