Class SevenZipAESEncryptionSettings

Class SevenZipAESEncryptionSettings

Nombre del espacio: Aspose.Zip.Saving Asamblea: Aspose.Zip.dll (25.5.0)

Clase de base para las configuraciones para varios métodos de cifrado 7z.

public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings

Inheritance

object SevenZipEncryptionSettings SevenZipAESEncryptionSettings

Miembros heredados

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

Remarks

El AES-256 es el único método de cifrado posible para el archivo 7z. Por lo tanto, el Aspose.Zip.Saving.SevenZipAESEncryptionSettings es la única implementación.

Constructors

SiguienteEncryptionSettings(El string)

Inicia una nueva instancia de la clase Aspose.Zip.Saving.SevenZipAESEncryptionSettings.

public SevenZipAESEncryptionSettings(string password)

Parameters

password string

contraseña para cifrado o descifrado.

Examples

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

SiguienteEncryptionSettings(SevenZipCipher)

Inicia una nueva instancia de la clase Aspose.Zip.Saving.SevenZipAESEncryptionSettings con cipher externo.

public SevenZipAESEncryptionSettings(SevenZipCipher cipher)

Parameters

cipher SevenZipCipher

Implementación personalizada de AES.

Examples

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