Esempio n. 1
0
        public static string DecryptedPassword(string sEncoded)
        {
            byte[]  abEncrypted = Convert.FromBase64String(sEncoded);
            string  sEncrypted  = ASCIIEncoding.ASCII.GetString(abEncrypted);
            CCipher cipher      = new CCipher();
            string  sPassword;

            cipher.DecodePassword(out sPassword, sEncrypted, mc_sToken);
            return(sPassword);
        }
Esempio n. 2
0
        public static string EncryptedPassword(string sPassword)
        {
            CCipher cipher = new CCipher();
            string  sEncrypted;

            cipher.EncodePassword(out sEncrypted, sPassword, mc_sToken);
            byte[] abEncoded = ASCIIEncoding.ASCII.GetBytes(sEncrypted);
            string sBase64   = Convert.ToBase64String(abEncoded);

            return(sBase64);
        }