Zip and RaR are just two technologies that are freely available to do this – other technologies are available that do the same job. ' Catch all exceptions of the ArchiverException type Catch ae As ArchiverExceptionĬonsole.WriteLine( "Message: ", ae.Message, ae.ErrorCode)ĭownload ZipForge.NET | Learn More | All VB.If you have a collection of files and folders to send to someone, a Zip or RaR archive folder will allow you to combine them all into a single file and protect (encrypt) all the contents with a single password. ' Set base (default) directory for all archive operationsĪrchiver.BaseDir = "C:\" ' Set encryption algorithm and passwordĪrchiver.EncryptionAlgorithm = EncryptionAlgorithm.Aes256Īrchiver.Password = "my_password" ' Add the c:\file.txt file to the archive ' by specifying its absolute path Try ' Set the name of the archive file we want to createĪrchiver.FileName = "C:\test.zip" ' Because we create a new archive, ' we set fileMode to System.IO.FileMode.CreateĪrchiver.OpenArchive(System.IO.FileMode.Create) ' Create an instance of the ZipForge class Dim archiver As New ZipForge() ' This namespace contains ArchiverException class ' required for error handling Imports ' Don't forget to add a reference to the ZipForge ' assembly to your project references Imports ' This namespace contains the main class - ZipForge. This sample demonstrates ZipForge.NET support of the strong AES encryption of ZIP archivesĭownload ZipForge.NET | Learn More | All VB.NET samples Zip with AES encryption in VB.NET code sample | Features | Requirements | Testimonials | C# Code Samples | VB.NET Code Samples | Download NET Components > ZipForge.NET > Zip with AES encryption in VB.NET
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |