Password Property

A password for the zip archive.

Syntax

ANSI (Cross Platform)
char* GetPassword();
int SetPassword(const char* lpszPassword); Unicode (Windows) LPWSTR GetPassword();
INT SetPassword(LPCWSTR lpszPassword);
@property (nonatomic,readwrite,assign,getter=password,setter=setPassword:) NSString* password;
- (NSString*)password;
- (void)setPassword:(NSString*)newPassword;
#define PID_SEVENZIP_PASSWORD 19

IPWORKSZIP_EXTERNAL void* IPWORKSZIP_CALL IPWorksZip_SevenZip_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSZIP_EXTERNAL int IPWORKSZIP_CALL IPWorksZip_SevenZip_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

This property specifies the case-sensitive password used to encrypt or decrypt the archive. If set to an empty string, no password is used.

In this release, streaming out of encrypted archives is not supported. When compressing, WriteToProgressEvent must be set to false if Password is set.

Example (Compressing an Archive)


ZipControl.ArchiveFile = "c:\test.zip"
ZipControl.RecurseSubdirectories = true
ZipControl.IncludeFiles("c:\foo\*")
ZipControl.Password = "nsoftware"
ZipControl.Compress()

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 C++ Edition - Version 20.0 [Build 8300]