Beispiel #1
0
        public static string GetConnectStringsLanConfig()
        {
            string raw = ReadRegKeyValue("db", "server_lan");

            if (raw == null)
            {
                return(null);
            }
            return(NetCryptoHelper.DecryptDes(raw, NetCryptoHelper.DesKey, NetCryptoHelper.DesIv));
        }
Beispiel #2
0
        public static string ReadRememberPassword()
        {
            string encPassword = GlobalTool.ReadRegKeyValue("lastuser", "password");

            if (encPassword == null)
            {
                return(null);
            }
            else
            {
                return(NetCryptoHelper.DecryptDes(encPassword, NetCryptoHelper.DesKey, NetCryptoHelper.DesIv));
            }
        }
Beispiel #3
0
        public static void SetConnectionStringLan(string s)
        {
            string ns = NetCryptoHelper.EncryptDes(s, NetCryptoHelper.DesKey, NetCryptoHelper.DesIv);

            WriteRegKeyValue("db", "server_lan", ns);
        }
Beispiel #4
0
        public static void WriteRememberPassword(string password)
        {
            string encPassword = NetCryptoHelper.EncryptDes(password, NetCryptoHelper.DesKey, NetCryptoHelper.DesIv);

            GlobalTool.WriteRegKeyValue("lastuser", "password", encPassword);
        }