title: efficiency improvement while doing encryption inside hadoop map tasks
body: <p>I am working on a project for which I need to encrypt the keys inside each map task, and then output the encrypted key.
  For example, if we take wordcount , then I need to parse each line of a record, and output (encrypted(word), 1).</p>
  
  <p>To do this, I am creating an encryption cipher inside each mapper...which I think might not be the most efficient way. As inside each mapper, I need to access encryption key, generate cipher and then do the encryption.</p>
  
  <p>Is there a way in which I don't need to create the cipher for each map task, and can instead re-use one cipher across all mappers?</p>
  
  <p>Greatly appreciate your help, thanks!</p>