cadrumo.adapters.persistence.storage.custody._profile_password_codec module

Exact byte transport for profile passwords, under the canonical policy.

Imported by the supervised key-derivation worker, which starts afresh for every wrap and unwrap. The typed refusal is therefore imported only when a password is actually refused, so the success path never loads the error hierarchy.

encode_profile_password(password)[source]

Encode an exact password after canonical defense-in-depth assessment.

Return type:

bytes

Parameters:

password (str)

decode_profile_password(value)[source]

Strictly decode and assess a password received through byte transport.

Return type:

str

Parameters:

value (bytes)