|
-
Jul 17th, 2003, 10:24 PM
#1
Thread Starter
Hyperactive Member
encrypt field in dataset......
Hello,
I am using a dataset to read an xml file, there is a password attribute in the xml field which i want to encrypt..
oDataset.ReadXml(Application.StartupPath & "\connections.xml")
cboDescription.DisplayMember = "settings_Text"
cboDescription.DataSource = oDataset.Tables("settings")
txtHost.DataBindings.Add("text", oDataset.Tables("settings"), "host")
txtUsr.DataBindings.Add("text", oDataset.Tables("settings"), "username")
txtPwd.DataBindings.Add("text", oDataset.Tables("settings"), "password")
i use the above code to bind my controls to the dataset, which reads and loads the data into the controls...
i already have my encryption function, is it possible to do something like
Decrypt(txtpwd.databindings.add("text,odataset.tables("settings"), "password"), "MYENCRYPTIONKEY")?
so that it decrypts the password and they can login?
i am using the Dataset.createxml("myfile.xml") to save the dataset to an xml file...how can i specify that all the password rows are to be encrypted? would i have to loop through them before i create the xml file ?
dim odatarow as datarow
for each odatarow in datarow(1).rows
encrypt(odatarow("password"),"mykey")
next
in theory i know how to do this but in reality, not really... any help would be appreciate thank you.
Last edited by gmatteson; Jul 17th, 2003 at 10:29 PM.
-
Jul 17th, 2003, 10:55 PM
#2
Thread Starter
Hyperactive Member
works...
i just got it to work, but if anyone has any ideas i would be interested in seeing how you do it, thanks.
all i did was when they go to save to the file was
dim oRow as datarow
for each oRow in dataset(1).rows
encrypt(orow("password"), "somekeyname")
next
and to decrypt, the same...after the file was loaded and the controls were bound.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|