Skip to content

API Reference

This reference documents all public APIs in adk-secure-sessions.

Quick Navigation

Core

Backends

Exceptions


Module Organization

Core Modules

Backend Modules


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:

from adk_secure_sessions import EncryptionBackend

class MyBackend:
    async def encrypt(self, plaintext: bytes) -> bytes: ...
    async def decrypt(self, ciphertext: bytes) -> bytes: ...

assert isinstance(MyBackend(), EncryptionBackend)