Refactory: encryption from object to class for avoid concurrent conflition