Skip to content

Security Algorithms

Register custom seed-key algorithms for SecurityAccess.

from pyudskit import UDS

uds = UDS()
uds.register_security_algorithm("xor", lambda seed, level: bytes(b ^ 0xAA for b in seed))
print(uds.list_security_algorithms())

pyudskit.security

register_security_algorithm(name, func)

Register a SecurityAccess key algorithm by name.

Source code in pyudskit/security.py
def register_security_algorithm(name: str, func: SecurityAlgo) -> None:
    """Register a SecurityAccess key algorithm by name."""
    _ALGORITHMS[name] = func