AesEcryptionSettings

AesEcryptionSettings constructor (1 of 2)

Initializes a new instance of the AesEcryptionSettings class.

public AesEcryptionSettings(string password, EncryptionMethod method)
ParameterTypeDescription
passwordStringPassword for encryption or decryption.
methodEncryptionMethodAlgorithm option indicating block size of cipher.

Exceptions

exceptioncondition
NotSupportedExceptionmethod is not one of AES128, AES192, or AES256.

Examples

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

See Also


AesEcryptionSettings constructor (2 of 2)

Initializes a new instance of the AesEcryptionSettings class without a password.

public AesEcryptionSettings(EncryptionMethod method)
ParameterTypeDescription
methodEncryptionMethodAlgorithm option indicating block size of cipher.

See Also