§ 45 BDSG
Scope
(1)The provisions of this Part shall apply to the processing of personal data by the public bodies competent for the prevention, investigation, detection, prosecution or punishment of criminal offences or administrative offences, insofar as they process data for the purpose of performing those tasks. The public bodies shall in this context be deemed controllers. Prevention of criminal offences within the meaning of the first sentence shall include the protection against and the prevention of threats to public security. The first and second sentences shall additionally apply to those public bodies which are competent for the execution of criminal sentences, of measures within the meaning of Section 11 Subsection (1) No. 8 of the Criminal Code, of educational measures or disciplinary measures within the meaning of the Youth Courts Act and of administrative fines. Insofar as this Part contains provisions for processors, it shall also apply to those.