public static Profile EncryptProfile(Profile profile) { profile.FirstName = StringCipher.Encrypt(profile.FirstName, EncryptKey); profile.LastName = StringCipher.Encrypt(profile.LastName, EncryptKey); profile.HomeLatitude = StringCipher.Encrypt(profile.HomeLatitude, EncryptKey); profile.HomeLongitude = StringCipher.Encrypt(profile.HomeLongitude, EncryptKey); profile.FullName = StringCipher.Encrypt(profile.FullName, EncryptKey); return(profile); }
public static Profile EncryptProfile(Profile profile) { try { profile.FirstName = StringCipher.Encrypt(profile.FirstName, EncryptKey); profile.LastName = StringCipher.Encrypt(profile.LastName, EncryptKey); profile.HomeLatitude = StringCipher.Encrypt(profile.HomeLatitude, EncryptKey); profile.HomeLongitude = StringCipher.Encrypt(profile.HomeLongitude, EncryptKey); profile.FullName = StringCipher.Encrypt(profile.FullName, EncryptKey); return(profile); } catch (Exception ex) { //This should be logged when ILogger is enabled Console.WriteLine($"Class Encryptor, Encryptprofile(). Exception= {ex.Message}, in profile HomeLatitude: {profile.HomeLatitude}, HomeLongitude: {profile.HomeLongitude}, ID: {profile.Id}"); return(profile); } }
public static AppLogin EncryptAppLogin(AppLogin appLogin) { appLogin.GuId = StringCipher.Encrypt(appLogin.GuId, EncryptKey); appLogin.UserName = StringCipher.Encrypt(appLogin.UserName, EncryptKey); return(appLogin); }
public static Token EncryptToken(Token token) { token.GuId = StringCipher.Encrypt(token.GuId, EncryptKey); token.TokenString = StringCipher.Encrypt(token.TokenString, EncryptKey); return(token); }
public static DmzModel.Employment EncryptEmployment(DmzModel.Employment employment) { employment.EmploymentPosition = StringCipher.Encrypt(employment.EmploymentPosition, EncryptKey); return(employment); }
public static GPSCoordinate EncryptGPSCoordinate(GPSCoordinate gpscoord) { gpscoord.Latitude = StringCipher.Encrypt(gpscoord.Latitude, EncryptKey); gpscoord.Longitude = StringCipher.Encrypt(gpscoord.Longitude, EncryptKey); return(gpscoord); }