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

Define the contract implemented by every password hashing driver.

Implementations must rely on algorithms designed for password storage (Argon2id, bcrypt) and never on general purpose digests such as MD5 or the SHA family.

Async Method check Verify a plain text value against an encoded hash.
Method getAlgorithm Return the identifier of the algorithm used by the driver.
Async Method make Hash a plain text value off the event loop.
Method needsRehash Determine whether a hash was produced with outdated parameters.
Method setRounds Set the default cost factor used by the driver.
Class Variable __slots__ Undocumented
@abstractmethod
async def check(self, value: str, hashed: str) -> bool: (source)

Verify a plain text value against an encoded hash.

Parameters
value:strPlain text value to verify.
hashed:strPreviously generated hash.
Returns
boolTrue when the value matches the hash, False otherwise.
@abstractmethod
def getAlgorithm(self) -> str: (source)

Return the identifier of the algorithm used by the driver.

Returns
strAlgorithm identifier, such as 'argon2id' or 'bcrypt'.
@abstractmethod
async def make(self, value: str, *, rounds: int | None = None, memory: int | None = None, threads: int | None = None) -> str: (source)

Hash a plain text value off the event loop.

Parameters
value:strPlain text value to hash.
rounds:int | NonePer-call cost override. Maps to the bcrypt cost factor and to the Argon2id time cost. None keeps the configured value.
memory:int | NonePer-call memory cost override, in kibibytes. Only meaningful for drivers that support it.
threads:int | NonePer-call parallelism override. Only meaningful for drivers that support it.
Returns
strEncoded hash, including algorithm identifier, parameters and salt.
@abstractmethod
def needsRehash(self, hashed: str) -> bool: (source)

Determine whether a hash was produced with outdated parameters.

Parameters
hashed:strPreviously generated hash.
Returns
boolTrue when the hash should be regenerated with the current configuration.
@abstractmethod
def setRounds(self, rounds: int) -> Self: (source)

Set the default cost factor used by the driver.

Parameters
rounds:intNew cost factor. Maps to the bcrypt cost factor and to the Argon2id time cost.
Returns
SelfThe same instance, allowing fluent configuration.
Raises
HashConfigurationExceptionIf the value is not a valid cost factor for the driver.