Encryption Settings¶
-
class
b2sdk.v1.EncryptionKey[source]¶ Hold information about encryption key: the key itself, and its id. The id may be None, if it’s not set in encrypted file’s fileInfo, or UNKNOWN_KEY_ID when that information is missing. The secret may be None, if encryption metadata is read from the server.
-
b2sdk.v1.UNKNOWN_KEY_ID¶ Value for EncryptionKey.key_id that signifies that the key id may or may not be defined. Useful when establishing encryption settings based on user input (and not based on B2 cloud data).
-
class
b2sdk.v1.EncryptionSetting[source]¶ Hold information about encryption mode, algorithm and key (for bucket default, file version info or even upload)
-
__init__(mode: b2sdk.encryption.types.EncryptionMode, algorithm: Optional[b2sdk.encryption.types.EncryptionAlgorithm] = None, key: Optional[b2sdk.encryption.setting.EncryptionKey] = None)[source]¶ - Parameters
mode (b2sdk.v1.EncryptionMode) – encryption mode
algorithm (b2sdk.v1.EncryptionAlgorithm) – encryption algorithm
key (b2sdk.v1.EncryptionKey) – encryption key object for SSE-C
-
-
v1.SSE_NONE= <EncryptionSetting(EncryptionMode.NONE, None, None)>¶ Commonly used “no encryption” setting
-
v1.SSE_B2_AES= <EncryptionSetting(EncryptionMode.SSE_B2, EncryptionAlgorithm.AES256, None)>¶ Commonly used SSE-B2 setting