我使用Objective-zip压缩一些带密码的文件并成功生成zip文件。但是,当我手动上传文件时,它说我的密码错了,有什么办法可以解决吗?它是由crc32还是其他东西造成的?
-(void) zipCandidcate:(NSString *)filePath Candidcate:(Candicate *)c{
ZipFile *zFile=[[ZipFile alloc] initWithFileName:filePath mode:ZipFileModeCreate ];
//write folder
NSString *cFolderPath=[c filePath];
//write photo
NSString *cPhotoPath=[[[c photos] objectAtIndex:0] path];
ws=[zFile writeFileInZipWithName:@"file/image-1.png" fileDate:[[NSDate alloc] init] compressionLevel:ZipCompressionLevelNone password:@"123" crc32:0];
[ws writeData:[[NSFileManager defaultManager] contentsAtPath:cPhotoPath]];
[ws finishedWriting];
ws=[zFile writeFileInZipWithName:@"file/" compressionLevel:ZipCompressionLevelNone];
[ws writeData:[[NSFileManager defaultManager] contentsAtPath:filePath]];
[ws finishedWriting];
[zFile close];
}