Event-based cryptography for automation networks of cyber-physical systems using the stream cipher ChaCha20