コード例 #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);
            }
        }