diagStartGenerateKeyFromSeed
Valid for: CANoe DEFunction Syntax
Description
Starts generation of the security key from the seed using a Seed & Key DLL. Returns an error if computation could not be started. The result of the computation is indicated by a call to the function _Diag_GenerateKeyResult. Note that the computation of a security key might take longer than 1 ms, which would cause problems with realtime event processing in CANoe DE product. Therefore the computation is done in the background, i.e. the result is not available immediately. In tester nodes it is possible to use the function TestWaitForGenerateKeyFromSeed. If the computation is guaranteed to take much less than 1 ms, diagGenerateKeyFromSeed may be used.Parameters
- seedArray: Seed bytes as returned by the ECU.
- seedArraySize: Number of bytes in the seedArray, as returned by the ECU.
- securityLevel: Security level for which the key will be created.
- variant: Variant qualifier as defined in the diagnostic description. In the first form of the function, this value will be the variant configured for the diagnostic description.
- option: Further options that will be forwarded to the DLL. If not present or an empty string, the value might be derived from the state of the communication, e.g. the diagnostics session the ECU is in.
- ecuQualifier: Qualifier of the ECU or target as set in the diagnostic configuration dialog for the respective diagnostic description.
Return Values
- 0: If computation was started
- otherwise: Error code