views:

282

answers:

5

Can i get link for AES-128 Bit Algorithm any sample code please help

+1  A: 

This may be a bit trite, but it's not hard to implement AES yourself. I've done it in a couple of hours. The official specification is here.

Dave DeLong
While this is true, and I've implemented it myself as well, using an existing AES implementation from a library is generally smarter and safer. +1 for linking to the specification, though.
Quinn Taylor
Using an existing library is always better unless it doesn't work AND it's not open source (i.e. it's broken and you can't fix it). I'm always frustrated by people who roll their own solution unnecessarily.
Adam Nelson
+1  A: 

Quite a few are written in C or C++ that you should be able to use in the iPhone, though I don't know of any that is written in Objective C as such. Note that in most (if not all) cases, the AES code itself is just one part of a larger library that attempts to include enough to actually make the cryptographic algorithm itself useful and usable.

Jerry Coffin
thankss for the info
madhavi
A: 

I think you want to use CCCryptor and not roll your own methods.

Adam Nelson
i am using CC_SHA224_DIGEST_LENGTH how long should be the key for this when we use md5 16 bit long key we have to use now for this how long should be the key
madhavi
+5  A: 

AES-128 is already implemented in the Security framework and CommonCrypto API for the iPhone. This site contains some sample code using this to encrypt a message.

You can also find sample code on Apple's website that makes use of this and provides some Objective-C wrappers.

Brandon Bodnár
A: 

Helloo Gurus now my problem is the data is going to get decrypt at other end and there they are using bouncy castle algorithm so using iphone sample code will it work fine there

madhavi