title: GDPR: Encrypted logging in C#
body: <p>The suggestion to encrypt log files as a means of protecting the personal data that might be contained in them is widespread.</p>
  
  <p>What I've not seen is a good reference implementation, which is surprising given how many companies will need this.</p>
  
  <p>In our particular case, we want to use public key encryption so that the files can not be read on the (weakly protected) system that generates them, and must be sent back to head office where we can look at them.</p>
  
  <p>The best suggestion I've seen so far is "use log4net but write your own appender using the RFC 3852 streaming implementation from BouncyCastle". Does anyone have an advance on that?</p>