API Reference¶
This reference documents all public APIs in adk-secure-sessions.
Quick Navigation¶
Core¶
EncryptionBackend— Protocol defining the encrypt/decrypt contract
Backends¶
FernetBackend— Fernet symmetric encryption backend
Exceptions¶
SecureSessionError— Base exception for all library errorsEncryptionError— Raised when encryption failsDecryptionError— Raised when decryption fails
Module Organization¶
Core Modules¶
adk_secure_sessions— Package root, public exportsadk_secure_sessions.protocols—EncryptionBackendprotocol (PEP 544)adk_secure_sessions.exceptions— Exception hierarchy
Backend Modules¶
adk_secure_sessions.backends.fernet— Fernet symmetric encryption (AES-128-CBC + HMAC-SHA256)
Common Use Cases¶
Encrypt session data with Fernet:
from adk_secure_sessions import FernetBackend
backend = FernetBackend(key="my-secret-passphrase")
ciphertext = await backend.encrypt(b"sensitive data")
plaintext = await backend.decrypt(ciphertext)
Custom encryption backend: