ah, ok - didn't see; was under the impression the code snippets are
isolated


On Fri, Feb 14, 2014 at 12:15 PM, Christos Vasilakis <
notifications@github.com> wrote:

> In docs/guides/aerogear-ios/Cryptography.asciidoc:
>
> > +
> > +
> > +----
> > +
> > +With link:http://aerogear.org/docs/specs/aerogear-crypto-ios/Classes/AGCryptoBox.html[AGCryptoBox], you can encrypt/decrypt data using your encryption key and a randomly generated IV (Initialization Vector) as shown below:
> > +
> > +[source,c]
> > +----
> > +
> > +    NSString* stringToEncrypt = @"I want to keep it secret";
> > +    // encode string into data
> > +    NSData* dataToEncrypt = [stringToEncrypt dataUsingEncoding:NSUTF8StringEncoding];
> > +    NSData* IV = [AGRandomGenerator randomBytes:16];
> > +
> > +    // init cryptobox with a key
> > +    AGCryptoBox* cryptoBox = [[AGCryptoBox alloc] initWithKey:encryptionKey];
>
> hmm it comes from earlier in the tutorial where it is generated using the
> PBKDF2 class
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/aerogear/aerogear.org/pull/250/files#r9745435>
> .
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf