コード例 #1
0
ファイル: Setting.cs プロジェクト: sikorskim/implant
        public static void initialSetup()
        {
            XElement xSetting = new XElement("setting");

            string newAesIv         = string.Empty;
            string newSalt          = string.Empty;
            int    newGenPassLength = 32;
            int    newRsaKeyLength  = 2048;
            bool   newAutoSignMsg   = false;
            string newAutoSignName  = string.Empty;
            string newUserPassword  = string.Empty;

            XAttribute xAesIv         = new XAttribute("aesIv", newAesIv);
            XAttribute xSalt          = new XAttribute("salt", newSalt);
            XAttribute xGenPassLength = new XAttribute("genPassLength", newGenPassLength);
            XAttribute xRsaKeyLength  = new XAttribute("rsaKeyLength", newRsaKeyLength);
            XAttribute xAutoSignMsg   = new XAttribute("autoSignMsg", newAutoSignMsg);
            XAttribute xAutoSignName  = new XAttribute("autoSignName", newAutoSignName);
            XAttribute xUserPassword  = new XAttribute("userPassword", newUserPassword);

            xSetting.Add(xAesIv);
            xSetting.Add(xSalt);
            xSetting.Add(xGenPassLength);
            xSetting.Add(xRsaKeyLength);
            xSetting.Add(xAutoSignMsg);
            xSetting.Add(xAutoSignName);
            xSetting.Add(xUserPassword);

            XMLService.addElement(path, xSetting);
        }
コード例 #2
0
ファイル: TrustedContact.cs プロジェクト: sikorskim/implant
        public static void add()
        {
            XElement xTrustedContact = new XElement("trustedContact");

            XAttribute xName       = new XAttribute("name", name);
            XAttribute xPrivPubKey = new XAttribute("pubKey", pubKey);
            XAttribute xNote       = new XAttribute("note", note);

            xTrustedContact.Add(xName);
            xTrustedContact.Add(xPrivPubKey);
            xTrustedContact.Add(xNote);

            XMLService.addElement(path, xTrustedContact);
        }
コード例 #3
0
        public static void add()
        {
            XElement xMyKey = new XElement(xElementName);

            XAttribute xName       = new XAttribute("name", name);
            XAttribute xPrivPubKey = new XAttribute("privPubKey", privPubKey);
            XAttribute xNote       = new XAttribute("note", note);

            xMyKey.Add(xName);
            xMyKey.Add(xPrivPubKey);
            xMyKey.Add(xNote);

            XMLService.addElement(path, xMyKey);
        }