Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 public static AppLogin EncryptAppLogin(AppLogin appLogin)
 {
     appLogin.GuId     = StringCipher.Encrypt(appLogin.GuId, EncryptKey);
     appLogin.UserName = StringCipher.Encrypt(appLogin.UserName, EncryptKey);
     return(appLogin);
 }
Exemplo n.º 4
0
 public static Token EncryptToken(Token token)
 {
     token.GuId        = StringCipher.Encrypt(token.GuId, EncryptKey);
     token.TokenString = StringCipher.Encrypt(token.TokenString, EncryptKey);
     return(token);
 }
Exemplo n.º 5
0
 public static DmzModel.Employment EncryptEmployment(DmzModel.Employment employment)
 {
     employment.EmploymentPosition = StringCipher.Encrypt(employment.EmploymentPosition, EncryptKey);
     return(employment);
 }
Exemplo n.º 6
0
 public static GPSCoordinate EncryptGPSCoordinate(GPSCoordinate gpscoord)
 {
     gpscoord.Latitude  = StringCipher.Encrypt(gpscoord.Latitude, EncryptKey);
     gpscoord.Longitude = StringCipher.Encrypt(gpscoord.Longitude, EncryptKey);
     return(gpscoord);
 }