Token
- class mtf.diag_port.sfa.sfa_manager.Token
Implementation of a secure token.
- __init__(token_path)
Create a new instance from the data in the given path.
- Args:
token_path (str): The path to the token data.
- Returns:
Token: The newly created instance.
- match_ecuid(ecuid)
check whether the token matches the provided ecu identifier.
- Args:
ecuid (int): The ECU ID to match.
- Returns:
bool: True on a match, False otherwise.
- match_vinid(vinid)
check whether the token matches the provided VIN (Vehicle identification Number).
- Args:
vinid (str): The VIN to check.
- Returns:
bool: True on match, False otherwise.
- match_ecuid_and_vinid(vinid, ecuid)
check wether the token matches both the given ECU ID and VIN.
- Args:
ecuid (int): The ECU ID to check. vinid (str): The VIN to check.
- Returns:
bool: True on success, False otherwise.
- property name
Get the token name.
- property length
Get the token length.
- property link_type
Get the token link type.
- property link_to_id
Get the token link to id.
- property timestamp
Get the token timestamp.
- property feature_id
Get the token feature id.
- property enable_type
Get the token enable type.
- property feature_specific_fields
Get the token’s feature specific fields.
- property raw
Get the token as a byte array.