added the algorithm for the encryption in model class