ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class SecureKeyGenerator: (source)

View In Hierarchy

Generate cryptographically secure application secret keys.

Static Method generate Generate a Laravel-compatible APP_KEY.
Constant KEY_SIZES Mapping of cipher modes to their respective key sizes in bytes.
Class Variable __slots__ Declare that this class introduces no additional instance slots.
def generate(cipher: str | Cipher = Cipher.AES_256_GCM) -> str: (source)

Generate a Laravel-compatible APP_KEY.

Parameters
cipher:str or orionis.foundation.config.app.CipherCipher used to select key length; default to AES-256-GCM. Legacy CBC identifiers remain accepted by this key utility only.
Returns
strA base64-encoded key string formatted like Laravel's APP_KEY.
Raises
ValueErrorIf the cipher does not name a supported algorithm.
KEY_SIZES: ClassVar[dict[Cipher, int]] = (source)

Mapping of cipher modes to their respective key sizes in bytes.

Value
{Cipher.AES_128_CBC: 16,
 Cipher.AES_256_CBC: 32,
 Cipher.AES_128_GCM: 16,
 Cipher.AES_256_GCM: 32}
__slots__: tuple = (source)

Declare that this class introduces no additional instance slots.