Apparatus for generating biocidal substances