예제 #1
0
 public static String Encrypt(this string Text)
 {
     try
     {
         String Ecrypted = CryptoClass.EncryptPlainTextToCipherText(Text);
         return(Ecrypted);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
예제 #2
0
 public static int Decrypt(this string ID)
 {
     try
     {
         ID = ID.Replace("~", "/");
         ID = ID.Replace("`", "\\");
         int DecryptedApplicantID = Convert.ToInt32(CryptoClass.DecryptCipherTextToPlainText(ID));
         return(DecryptedApplicantID);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #3
0
 public static String EncryptID(this Int64 ID)
 {
     try
     {
         string EcryptedApplicantID = CryptoClass.EncryptPlainTextToCipherText(ID.ToString());
         EcryptedApplicantID = EcryptedApplicantID.Replace("/", "~");
         EcryptedApplicantID = EcryptedApplicantID.Replace("\\", "`");
         return(EcryptedApplicantID);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
예제 #4
0
 public static Int64 DecryptID(this string ID)
 {
     try
     {
         ID = ID.Replace("~", "/");
         ID = ID.Replace("`", "\\");
         Int64 DecryptedApplicantID = Convert.ToInt64(CryptoClass.DecryptCipherTextToPlainText(ID));
         return(DecryptedApplicantID);
     }
     catch
     {
         return(0);
     }
 }