Class SevenZipAESEncryptionSettings

Class SevenZipAESEncryptionSettings

Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)

Kelas dasar untuk pengaturan beberapa metode enkripsi 7z.

public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings

Pewarisan

objectSevenZipEncryptionSettingsSevenZipAESEncryptionSettings

Anggota yang Dwarisi

SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Catatan

AES-256 adalah satu-satunya metode enkripsi yang mungkin untuk arsip 7z. Jadi Aspose.Zip.Saving.SevenZipAESEncryptionSettings adalah satu-satunya implementasi.

Konstruktor

SevenZipAESEncryptionSettings(string)

Menginisialisasi sebuah instance baru dari kelas Aspose.Zip.Saving.SevenZipAESEncryptionSettings.

public SevenZipAESEncryptionSettings(string password)

Parameter

password string

Kata sandi untuk enkripsi atau dekripsi.

Contoh

using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.7z");
}

SevenZipAESEncryptionSettings(SevenZipCipher)

Menginisialisasi sebuah instance baru dari kelas Aspose.Zip.Saving.SevenZipAESEncryptionSettings dengan cipher eksternal.

public SevenZipAESEncryptionSettings(SevenZipCipher cipher)

Parameter

cipher SevenZipCipher

Implementasi AES kustom.

Contoh

SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.7z");
}
 Indonesia