ZIP 압축 파일에 비밀번호를 설정하여 보호한다는 것은 압축 파일의 내용을 안전하게 지키는 것을 의미합니다. 이렇게 하면 올바른 비밀번호를 가진 사람만 ZIP 압축 파일 내의 파일을 추출하거나 접근할 수 있습니다. 비밀번호는 일종의 암호화 역할을 하여 압축 파일에 저장된 파일에 대한 무단 접근을 방지합니다. 비밀번호로 보호된 ZIP 압축 파일에서 파일을 추출하려면 사용자는 올바른 비밀번호를 입력해야 합니다.
ZIP 파일을 생성, 읽기 및 압축 해제하는 방법을 알아보세요.using IronZip;
using IronZip.Enum;
// Create empty ZIP with highest compression
using (var archive = new IronZipArchive(9))
{
// Password protect the ZIP (Support AES128 & AES256)
archive.Encrypt("P@ssw0rd", EncryptionMethods.Traditional);
archive.Add("./assets/image1.jpg");
archive.Add("./assets/image2.jpg");
// Export the ZIP
archive.SaveAs("output.zip");
}
Imports IronZip
Imports IronZip.Enum
' Create empty ZIP with highest compression
Using archive = New IronZipArchive(9)
' Password protect the ZIP (Support AES128 & AES256)
archive.Encrypt("P@ssw0rd", EncryptionMethods.Traditional)
archive.Add("./assets/image1.jpg")
archive.Add("./assets/image2.jpg")
' Export the ZIP
archive.SaveAs("output.zip")
End Using