Method for checking an actual state of at least two electronic components, which each have a predefined item of component information and an item of state information and which are part of a network and part of a safety-relevant system, with the steps: - ascertaining an actual state of all electronic components as a function of the predefined component information and the state information, - providing a predefined target state of the electronic components, - comparing the ascertained actual state with the predefined target state, and - outputting an error signal as a function of the comparison, wherein, when ascertaining the actual state, - each electronic component ascertains a hash value as a function of the predefined component information and the state information, - a common hash value is ascertained by way of the ascertained hash values, and - the common hash value is representative of the actual state, wherein each item of component information is representative of a unique identifier of one of the electronic components in each case, cannot be generated by the electronic components and is exclusively known to a unique electronic component from the at least two electronic components, wherein, to ascertain the predefined target state, - for each electronic component a further hash value is ascertained by an external apparatus, which is not part of the network, as a function of the predefined component information and a predefined item of state information, - a further common hash value is ascertained by way of the ascertained further hash values, and - the further common hash value is representative of the predefined target state, wherein, when comparing the ascertained actual state, the predefined target state is used to check whether or not the common hash value and the further common hash value are different. - ascertaining an actual state of all electronic components as a function of the predefined component information and the state information, - providing a predefined target state of the electronic components, - comparing the ascertained actual state with the predefined target state, and - outputting an error signal as a function of the comparison, wherein, when ascertaining the actual state, - each electronic component ascertains a hash value as a function of the predefined component information and the state information, - a common hash value is ascertained by way of the ascertained hash values, and - the common hash value is representative of the actual state, wherein each item of component information is representative of a unique identifier of one of the electronic components in each case, cannot be generated by the electronic components and is exclusively known to a unique electronic component from the at least two electronic components, wherein, to ascertain the predefined target state, wherein each item of component information is representative of a unique identifier of one of the electronic components in each case, cannot be generated by the electronic components and is exclusively known to a unique electronic component from the at least two electronic components, wherein, to ascertain the predefined target state, - for each electronic component a further hash value is ascertained by an external apparatus, which is not part of the network, as a function of the predefined component information and a predefined item of state information, - a further common hash value is ascertained by way of the ascertained further hash values, and - the further common hash value is representative of the predefined target state, wherein, when comparing the ascertained actual state, the predefined target state is used to check whether or not the common hash value and the further common hash value are different.