Encryption Settings
- class b2sdk.v2.EncryptionKey(secret, key_id)[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.v2.UNKNOWN_KEY_ID
alias of _UnknownKeyId.unknown_key_id
- class b2sdk.v2.EncryptionSetting(mode, algorithm=None, key=None)[source]
Hold information about encryption mode, algorithm and key (for bucket default, file version info or even upload)
- Parameters:
mode (
EncryptionMode
) –algorithm (
EncryptionAlgorithm
) –key (
EncryptionKey
) –
- __init__(mode, algorithm=None, key=None)[source]
- Parameters:
mode (
EncryptionMode
) – encryption modealgorithm (
EncryptionAlgorithm
) – encryption algorithmkey (
EncryptionKey
) – encryption key object for SSE-Cmode –
algorithm –
key –
- v2.SSE_NONE = <EncryptionSetting(EncryptionMode.NONE, None, None)>
Commonly used “no encryption” setting
- v2.SSE_B2_AES = <EncryptionSetting(EncryptionMode.SSE_B2, EncryptionAlgorithm.AES256, None)>
Commonly used SSE-B2 setting