public static Decrypt ( string cipherText, string passPhrase ) : string | ||
cipherText | string | |
passPhrase | string | |
return | string |
public static AuthorizationViewModel DecryptAuthorization(AuthorizationViewModel auth) { if (auth.GuId != null) { auth.GuId = StringCipher.Decrypt(auth.GuId, EncryptKey); } return(auth); }
//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); } return(profile); }
public static string DecryptUserName(string username) { return(StringCipher.Decrypt(username, EncryptKey)); }
public static EmploymentViewModel DecryptEmployment(EmploymentViewModel employment) { employment.EmploymentPosition = StringCipher.Decrypt(employment.EmploymentPosition, EncryptKey); return(employment); }