AesEcryptionSettings.AesEcryptionSettings

AesEcryptionSettings(string, EncryptionMethod)

Initierar en ny instans avAesEcryptionSettings class.

public AesEcryptionSettings(string password, EncryptionMethod method)
ParameterTypBeskrivning
passwordStringLösenord för kryptering eller dekryptering.
methodEncryptionMethodAlgoritmalternativ som indikerar blockstorlek på chiffer.

Undantag

undantagskick
NotSupportedExceptionmethod är inte en avAES128 ,AES192 , ellerAES256.

Exempel

using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.zip");
}

Se även


AesEcryptionSettings(EncryptionMethod)

Initierar en ny instans avAesEcryptionSettingsklass utan lösenord.

public AesEcryptionSettings(EncryptionMethod method)
ParameterTypBeskrivning
methodEncryptionMethodAlgoritmalternativ som indikerar blockstorlek på chiffer.

Se även