Hey all. I'm working on an xml file that pulls some data from another xml document "a password, usename and account info" wich is stored on my local drive for easy access so i dont have to enter the info each time. As is now the data is entered into the xml file manually then saved and when the program runs it reads the data from the xml file i manually entered my data into. This all works fine except the data is left in plain text and can be read by anyone with access to my pc. The solutions seems simple to encrypt the data some how then have it decrypted when the program runs. Ive read alot! So much my head hurts! Ive found several code examples that sound to do what i want but im a little confused how to implement any of the methods ive found or where to start with it.
The code im working with is below. All i need is the data.text in the code below it is <include>LoginD ata.txt.xml</include> file to be encrypted and saved as encrypted. Creating another page wich asks for the data to be entered then saved through the interface instead of manually can easily be done which is where the encrypting part will most likely take place. Then within the code below decrypt the data so the code below can continue working like normal. Any help, suggestions, ideas anything will help. Thanks in advance.
[code=xml]
<Page IgnoreTab="fals e" Location="310,2 10" Name="WindowPag e" PackLocation="c enter,center" PackLocationPro p="-202/0001,-174/0001" ScrollExtent="5 24,374" Size="524,374">
<Scrollbar ArrowPressSound ="sounds/button" Control="Charac terSelect" HideIfUnnecessa ry="true" Location="473,7 5" MaximumSize="22 ,16384" MinimumSize="22 ,60" Name="Scroll" PackLocation="r ight,top" PackLocationPro p="-051/0001,0075/0001" PackSize="f,a" PackSizeProp="0 002/0003,0148/0001" ScrollExtent="2 2,226" Size="22,226" Style="/CommonElements. ScrollbarVertic al.data.style"/>
<Listbox BackgroundColor ="#FFFFFF" DataSource="Cha racterData" LocalTooltip="C lick to select, double-click to login" Location="260,7 7" Margin="10,10,1 0,10" Name="Character Select" OnDoubleClick=" Parent.Autoplay Char.Text=Selec tedItem.Name
Parent.Autoplay World.Text=Sele ctedItem.Server
Parent.Username .Text=SelectedI tem.Username
Parent.Password .Text=SelectedI tem.Password
Parent.ConnectB utton.Press=tru e" OnSelect="Paren t.AutoplayChar. Text=SelectedIt em.Name
Parent.Autoplay World.Text=Sele ctedItem.Server
Parent.Username .Text=SelectedI tem.Username
Parent.Password .Text=SelectedI tem.Password" PackSize="a,a" PackSizeProp="0 290/0001,0153/0001" RowTemplate="Ch aracterSelect_t emplate" ScrollExtent="3 20,221" Size="234,221" Style="/CommonElements. Listbox.data.li stbox_style" Tooltip="Click to select, double-click to login"/>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText="Sele ct Character below or enter login data manually on the left:" Location="260,3 8" Name="SelectCha r" ScrollExtent="2 22,33" Size="222,33" TextAlignmentVe rtical="Center" TextColor="#F2E FE1">Select Character below or enter login data manually on the left:</Text>
<Button LocalText="Clea r All" Location="41,22 4" MaximumSize="16 384,26" MinimumSize="26 ,26" Name="ClearAllB tn" OnPress="Parent .Username.Text= '' Parent.Password .Text='&ap os; Parent.Autoplay Char.Text=&apos ;' Parent.Autoplay World.Text=&apo s;'" ScrollExtent="6 9,26" Size="69,26" Style="/CommonElements. SmallPushButton .data.style">Cl ear All</Button>
<Button LocalText="Clea r Character/Server" LocalTooltip="C lears character and server choice so you can login to character select/create screen" Location="110,2 24" MaximumSize="16 384,26" MinimumSize="26 ,26" Name="ClearCSBt n" OnPress="Parent .AutoplayChar.T ext='&apos ; Parent.Autoplay World.Text=&apo s;'" ScrollExtent="1 26,26" Size="126,26" Style="/CommonElements. SmallPushButton .data.style" Tooltip="Clears character and server choice so you can login to character select/create screen">Clear Character/Server</Button>
<include>LoginD ata.txt.xml</include>
<Template Name="Character Select_template " Size="320,20">R owTemplate.xml</Template>
<Text Font="/TextStyles.Very Large.VeryLarge Style" LocalText=":312 9920a94361beb:L ogin" Location="41,53 " Name="Login" ScrollExtent="1 92,48" Size="192,30" TextAlignment=" Center" TextAlignmentVe rtical="Center" TextColor="#F2E FE1">:3129920a9 4361beb:Login</Text>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920afed79bde:U sername" Location="19,95 " Name="UsernameL abel" ScrollExtent="8 0,30" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920af ed79bde:Usernam e</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,9 1" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="Username" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920a334bdb7c:P assword" Location="19,12 8" Name="PasswordL abel" ScrollExtent="8 0,45" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920a3 34bdb7c:Passwor d</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 23" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="Password" Password="true" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920aee74cd68:C haracter" Location="19,15 9" Name="AutoplayC harLabel" OnHide="Visible =True" ScrollExtent="8 0,45" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920ae e74cd68:Charact er</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 55" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="AutoplayC har" OnHide="Visible =True" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920a0449c1b8:S erver" Location="19,19 4" Name="AutoplayW orldLabel" OnHide="Visible =True" ScrollExtent="8 0,30" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920a0 449c1b8:Server</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 89" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="AutoplayW orld" OnHide="Visible =True" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Button IsDefaultButton ="true" LocalText=":312 9920a94361beb_1 :Login" Location="36,26 7" MaximumSize="16 384,38" MinimumSize="38 ,38" Name="ConnectBu tton" ScrollExtent="1 00,38" Size="100,38" Style="/CommonElements. LargePushButton .data.style">:3 129920a94361beb _1:Login</Button>
<Button LocalText=":312 9920acbc4d4cf:E xit" Location="138,2 67" MaximumSize="16 384,38" MinimumSize="38 ,38" Name="QuitButto n" ScrollExtent="1 00,38" Size="100,38" Style="/CommonElements. LargePushButton .data.style">:3 129920acbc4d4cf :Exit</Button>
<Page BackgroundOpaci ty="1.000" Location="26,36 " Name="RoundedGr ouper" RStyleDefault="/CommonElements. RoundedGrouper. data.rect" ScrollExtent="2 24,226" Size="224,226"/>
<Page BackgroundOpaci ty="1.000" Location="250,6 9" Name="RoundedGr ouper2" RStyleDefault="/CommonElements. RoundedGrouper. data.rect" ScrollExtent="2 52,237" Size="252,237"/>
<Page BackgroundOpaci ty="1.000" Location="17,17 " Name="InteriorG rouper" RStyleDefault="/WindowElements. InteriorGrouper .data.default_b kg.rect" ScrollExtent="4 92,303" Size="492,303">
<Page BackgroundOpaci ty="1.000" Name="Frame" PackSize="a,a" PackSizeProp="0 000/0001,0000/0001" RStyleDefault="/WindowElements. InteriorGrouper .data.frame.rec t" ScrollExtent="4 92,303" Size="492,303"/>
</Page>
[/code]
The code im working with is below. All i need is the data.text in the code below it is <include>LoginD ata.txt.xml</include> file to be encrypted and saved as encrypted. Creating another page wich asks for the data to be entered then saved through the interface instead of manually can easily be done which is where the encrypting part will most likely take place. Then within the code below decrypt the data so the code below can continue working like normal. Any help, suggestions, ideas anything will help. Thanks in advance.
[code=xml]
<Page IgnoreTab="fals e" Location="310,2 10" Name="WindowPag e" PackLocation="c enter,center" PackLocationPro p="-202/0001,-174/0001" ScrollExtent="5 24,374" Size="524,374">
<Scrollbar ArrowPressSound ="sounds/button" Control="Charac terSelect" HideIfUnnecessa ry="true" Location="473,7 5" MaximumSize="22 ,16384" MinimumSize="22 ,60" Name="Scroll" PackLocation="r ight,top" PackLocationPro p="-051/0001,0075/0001" PackSize="f,a" PackSizeProp="0 002/0003,0148/0001" ScrollExtent="2 2,226" Size="22,226" Style="/CommonElements. ScrollbarVertic al.data.style"/>
<Listbox BackgroundColor ="#FFFFFF" DataSource="Cha racterData" LocalTooltip="C lick to select, double-click to login" Location="260,7 7" Margin="10,10,1 0,10" Name="Character Select" OnDoubleClick=" Parent.Autoplay Char.Text=Selec tedItem.Name
Parent.Autoplay World.Text=Sele ctedItem.Server
Parent.Username .Text=SelectedI tem.Username
Parent.Password .Text=SelectedI tem.Password
Parent.ConnectB utton.Press=tru e" OnSelect="Paren t.AutoplayChar. Text=SelectedIt em.Name
Parent.Autoplay World.Text=Sele ctedItem.Server
Parent.Username .Text=SelectedI tem.Username
Parent.Password .Text=SelectedI tem.Password" PackSize="a,a" PackSizeProp="0 290/0001,0153/0001" RowTemplate="Ch aracterSelect_t emplate" ScrollExtent="3 20,221" Size="234,221" Style="/CommonElements. Listbox.data.li stbox_style" Tooltip="Click to select, double-click to login"/>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText="Sele ct Character below or enter login data manually on the left:" Location="260,3 8" Name="SelectCha r" ScrollExtent="2 22,33" Size="222,33" TextAlignmentVe rtical="Center" TextColor="#F2E FE1">Select Character below or enter login data manually on the left:</Text>
<Button LocalText="Clea r All" Location="41,22 4" MaximumSize="16 384,26" MinimumSize="26 ,26" Name="ClearAllB tn" OnPress="Parent .Username.Text= '' Parent.Password .Text='&ap os; Parent.Autoplay Char.Text=&apos ;' Parent.Autoplay World.Text=&apo s;'" ScrollExtent="6 9,26" Size="69,26" Style="/CommonElements. SmallPushButton .data.style">Cl ear All</Button>
<Button LocalText="Clea r Character/Server" LocalTooltip="C lears character and server choice so you can login to character select/create screen" Location="110,2 24" MaximumSize="16 384,26" MinimumSize="26 ,26" Name="ClearCSBt n" OnPress="Parent .AutoplayChar.T ext='&apos ; Parent.Autoplay World.Text=&apo s;'" ScrollExtent="1 26,26" Size="126,26" Style="/CommonElements. SmallPushButton .data.style" Tooltip="Clears character and server choice so you can login to character select/create screen">Clear Character/Server</Button>
<include>LoginD ata.txt.xml</include>
<Template Name="Character Select_template " Size="320,20">R owTemplate.xml</Template>
<Text Font="/TextStyles.Very Large.VeryLarge Style" LocalText=":312 9920a94361beb:L ogin" Location="41,53 " Name="Login" ScrollExtent="1 92,48" Size="192,30" TextAlignment=" Center" TextAlignmentVe rtical="Center" TextColor="#F2E FE1">:3129920a9 4361beb:Login</Text>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920afed79bde:U sername" Location="19,95 " Name="UsernameL abel" ScrollExtent="8 0,30" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920af ed79bde:Usernam e</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,9 1" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="Username" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920a334bdb7c:P assword" Location="19,12 8" Name="PasswordL abel" ScrollExtent="8 0,45" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920a3 34bdb7c:Passwor d</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 23" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="Password" Password="true" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920aee74cd68:C haracter" Location="19,15 9" Name="AutoplayC harLabel" OnHide="Visible =True" ScrollExtent="8 0,45" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920ae e74cd68:Charact er</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 55" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="AutoplayC har" OnHide="Visible =True" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Text Font="/TextStyles.Norm al.NormalStyle" LocalText=":312 9920a0449c1b8:S erver" Location="19,19 4" Name="AutoplayW orldLabel" OnHide="Visible =True" ScrollExtent="8 0,30" Size="80,19" TextAlignment=" Right" TextAlignmentVe rtical="Center" TextColor="#F0D 080">:3129920a0 449c1b8:Server</Text>
<Textbox BackgroundColor ="#FFFFFF" BackgroundOpaci ty="1.000" Cursor="/Cursor.Text" Location="108,1 89" MaximumSize="16 384,30" MinimumSize="30 ,30" Name="AutoplayW orld" OnHide="Visible =True" RStyleActivated ="/CommonElements. Textfield.data. selected.rect" RStyleDefault="/CommonElements. Textfield.data. default.rect" RStyleDisabled= "/CommonElements. Textfield.data. disabled.rect" RStyleDisabledA ctivated="/CommonElements. Textfield.data. disabled.rect" RStyleMouseOver ="/CommonElements. Textfield.data. mouseover.rect" RStyleMouseOver Activated="/CommonElements. Textfield.data. selected.rect" RStyleMouseOver Selected="/CommonElements. Textfield.data. selected.rect" RStyleSelected= "/CommonElements. Textfield.data. selected.rect" ScrollExtent="1 29,30" Size="129,30" Style="/CommonElements. Textfield.data. style"></Textbox>
<Button IsDefaultButton ="true" LocalText=":312 9920a94361beb_1 :Login" Location="36,26 7" MaximumSize="16 384,38" MinimumSize="38 ,38" Name="ConnectBu tton" ScrollExtent="1 00,38" Size="100,38" Style="/CommonElements. LargePushButton .data.style">:3 129920a94361beb _1:Login</Button>
<Button LocalText=":312 9920acbc4d4cf:E xit" Location="138,2 67" MaximumSize="16 384,38" MinimumSize="38 ,38" Name="QuitButto n" ScrollExtent="1 00,38" Size="100,38" Style="/CommonElements. LargePushButton .data.style">:3 129920acbc4d4cf :Exit</Button>
<Page BackgroundOpaci ty="1.000" Location="26,36 " Name="RoundedGr ouper" RStyleDefault="/CommonElements. RoundedGrouper. data.rect" ScrollExtent="2 24,226" Size="224,226"/>
<Page BackgroundOpaci ty="1.000" Location="250,6 9" Name="RoundedGr ouper2" RStyleDefault="/CommonElements. RoundedGrouper. data.rect" ScrollExtent="2 52,237" Size="252,237"/>
<Page BackgroundOpaci ty="1.000" Location="17,17 " Name="InteriorG rouper" RStyleDefault="/WindowElements. InteriorGrouper .data.default_b kg.rect" ScrollExtent="4 92,303" Size="492,303">
<Page BackgroundOpaci ty="1.000" Name="Frame" PackSize="a,a" PackSizeProp="0 000/0001,0000/0001" RStyleDefault="/WindowElements. InteriorGrouper .data.frame.rec t" ScrollExtent="4 92,303" Size="492,303"/>
</Page>
[/code]
Comment