views:

354

answers:

1

What are different padding modes and cipher modes in IPhone for AES encryption?

Thanks

+3  A: 

There are two padding modes--PKCS #7 and none--and two corresponding cipher modes--CBC and ECB. If you specify kCCOptionPKCS7Padding then you get CBC and if you specify kCCOptionECBMode then there's no padding and you get ECB. The default is CBC, according the CommonCrypto header.

bbrown