Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Verify a Zip's PasswordDemonstrates how to verify the password for an encrypted or password-protected zip archive.
LOCAL loZip LOCAL lnSuccess LOCAL lnPasswordOk loZip = CreateObject('Chilkat.Zip2') * Any string unlocks the component for the 1st 30-days. lnSuccess = loZip.UnlockComponent("Anything for 30-day trial") IF (lnSuccess <> 1) THEN =MESSAGEBOX(loZip.LastErrorText) QUIT ENDIF * To verify a password for a Zip, the Zip must be opened: lnSuccess = loZip.OpenZip("myProtected.zip") IF (lnSuccess <> 1) THEN =MESSAGEBOX(loZip.LastErrorText) QUIT ENDIF * Set the password to be verified: loZip.DecryptPassword = "secret" lnPasswordOk = loZip.VerifyPassword() IF (lnPasswordOk = 1) THEN =MESSAGEBOX("Password is correct.") ELSE =MESSAGEBOX("Password is incorrect.") ENDIF loZip.CloseZip() |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser