Пример #1
0
        public static string EncryptCardNo(String cardNum)
        {
            CardEncryptionService.Service myencryptionservice = new CardEncryptionService.Service();
            string encryptedCNo = myencryptionservice.Encrypt(cardNum);

            return(encryptedCNo);
        }
Пример #2
0
        public static bool verifyaccount(string TAname, String encryptedcno)
        {
            CardEncryptionService.Service myencryptionservice = new CardEncryptionService.Service();
            String decryptedcno = myencryptionservice.Decrypt(encryptedcno);

            if (accountregister.ContainsKey(TAname))
            {
                if (accountregister[TAname].Equals(decryptedcno))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }