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
Post a Comment