IPWorks OpenPGP 2020 Python Edition

Questions / Feedback?

auto_select_algorithms Property

Whether to automatically select algorithms when encrypting or signing.

Syntax

def get_auto_select_algorithms() -> int: ...
def set_auto_select_algorithms(value: int) -> None: ...

auto_select_algorithms = property(get_auto_select_algorithms, set_auto_select_algorithms)

Default Value

0

Remarks

This property is set to the binary 'OR' of one or more options indicating which algorithms to automatically select.

When enabled automatic selection is performed by examining the perferred algorithms specified by the key.

When encrypt is called the class will read the preferred encryption algorithm and compression method from the key specified in the RecipientKey* properties.

If multiple keys are specified the preferred encryption algorithm and compression method from the last key is used. The encrypting_algorithm and compression_method properties are ignored.

When sign is called the class will read the preferred MAC algorithm and compression method from the private key specified in the Key* properties. If multiple keys are specified the preferred MAC algorithm and compression method from the last key is used. The signing_algorithm and compression_method properties are ignored.

The list below defines available options.

Compression Algorithm 1 (Hex 0x01)
Cipher Algorithm 2 (Hex 0x02)
MAC Algorithm 4 (Hex 0x04)

The default value is 0 which means algorithms are not automatically selected.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks OpenPGP 2020 Python Edition - Version 20.0 [Build 8161]