Example #1
0
        public Tuple <long, float> decryptFunc(string cc, string amt)
        {
            EncryptionDecryption.IService dc = new EncryptionDecryption.ServiceClient();
            long  decryptedCC;
            float decryptedAmount;

            decryptedCC     = long.Parse(dc.Decrypt(cc).ToString());
            decryptedAmount = float.Parse(dc.Decrypt(amt).ToString());

            return(Tuple.Create(decryptedCC, decryptedAmount));
        }
        public void encryptFunc(long cc, float amt)
        {
            EncryptionDecryption.IService ed = new EncryptionDecryption.ServiceClient();

            string creditcardno;
            string amount;

            creditcardno = cc.ToString();
            amount       = amt.ToString();

            string encryptedccn = ed.Encrypt(creditcardno).ToString();
            string encryptedamt = ed.Encrypt(amount).ToString();

            BankService bs = new BankService();

            bs.checkCC(encryptedccn, encryptedamt);
        }