Class SevenZipAESEncryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Basklass för inställningar för flera 7z-krypteringsmetoder.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Arv
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Ärvt Medlemmar
SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Kommentarer
AES-256 är den enda möjliga krypteringsmetoden för 7z-arkiv. Så Aspose.Zip.Saving.SevenZipAESEncryptionSettings är den enda implementeringen.
Konstruktörer
SevenZipAESEncryptionSettings(string)
Initierar en ny instans av klassen Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Parametrar
password
string
Lösenord för kryptering eller dekryptering.
Exempel
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
SevenZipAESEncryptionSettings(SevenZipCipher)
Initierar en ny instans av klassen Aspose.Zip.Saving.SevenZipAESEncryptionSettings med extern cipher.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parametrar
cipher
SevenZipCipher
Anpassad AES-implementation.
Exempel
SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}