iphone - Encrypting different types of files using C or Objective-C -


i have chosen algorithm encrypt file. may encrypt text or image files. how can write generic type of encryption method works both text , image files? i'm working objective-c.

what ever encrypting might using data or nsdata, converting char array , applying algorithm. make method takes nsdata argument, , return encrypted nsdata.

e.g.

-(nsdata*)encrypt:(nsdata*)data{   ///your algorithm    return encrypteddata; } 

convert image or file nsdata , pass method.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -