Started encrypt method  and added testing