//Decrypt public static ProfileViewModel DecryptProfile(ProfileViewModel profile) { profile.Firstname = StringCipher.Decrypt(profile.Firstname, EncryptKey); profile.Lastname = StringCipher.Decrypt(profile.Lastname, EncryptKey); profile.HomeLatitude = StringCipher.Decrypt(profile.HomeLatitude, EncryptKey); profile.HomeLongitude = StringCipher.Decrypt(profile.HomeLongitude, EncryptKey); for (int i = 0; i < profile.Employments.Count(); i++) { EmploymentViewModel e = profile.Employments.ElementAt(i); e = DecryptEmployment(e); } for (int i = 0; i < profile.Tokens.Count(); i++) { TokenViewModel t = profile.Tokens.ElementAt(i); t = DecryptToken(t); } return profile; }