thank u so much.
everything is working fine.
but one problem is occurred when i reopen the file after closing previous one and again start writing with encryption.
and same when i restart my application and again trying to encryption/decryption of last saved file.
i m using a WriteEncFile class that is derived from NSObject to write file,here diffrent function for initialize,open,write and close the file.
i m initialize MyTransformer in open function where i open the file,and release it in close function where i close the file.
and executing the these function from different class.
so when i close the file so MyTransformer is release and again initialize when i open the file.
like:
now i dont understand now where i m wrong please guide me for this
thanks in advance.
everything is working fine.
but one problem is occurred when i reopen the file after closing previous one and again start writing with encryption.
and same when i restart my application and again trying to encryption/decryption of last saved file.
i m using a WriteEncFile class that is derived from NSObject to write file,here diffrent function for initialize,open,write and close the file.
i m initialize MyTransformer in open function where i open the file,and release it in close function where i close the file.
and executing the these function from different class.
so when i close the file so MyTransformer is release and again initialize when i open the file.
like:
Code:
- (void) open
{
mTransformer = [[MyTransformer alloc] initWithKey:@"ABCDEFG"];
mFile = fopen([filename fileSystemRepresentation], "a");
}
- (void) close
{
if (mFile)
{
fclose(mFile);
mFile = NULL;
[mTransformer release];
}
}
now i dont understand now where i m wrong please guide me for this
thanks in advance.
Last edited by a moderator: