I'm adding password encryption to the Employees form. I have a
strongly-typed dataset being used as the datasource for the
EmployeesBindin gSource, and the Employees table set as the datamember. All
controls on the form are bound to the EmployeesBindin gSource. Except for the
password ...
I set up separate handlers for the Password and bind this control manually
when I New() the form:
Private Sub BindPasswordCon trol()
Dim b As Binding = New Binding("Text", EmployeesBindin gSource,
"Password")
AddHandler b.Format, AddressOf PasswordFormat
AddHandler b.Parse, AddressOf PasswordParse
txtPassword.Dat aBindings.Add(b )
End Sub
Private Sub PasswordFormat( ByVal sender As Object, ByVal e As
ConvertEventArg s)
If IsDBNull(e.Valu e) = False Then
e.Value = EncryptPassword (CStr(e.Value))
End If
End Sub
The handlers ARE being called, however, the Password column of the
strongly-typed dataset does not get changed to the password entered into the
Password textbox (it remains null). I can also see that the e.Value is being
passed to the EncryptPassword function. Yet when I check the datatable, the
Password column is empty (all other columns have the correct data). What the
heck am I overlooking here!? 2 1421
Hi,
"Earl" <br******@newsg roups.nospamwro te in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
I'm adding password encryption to the Employees form. I have a
strongly-typed dataset being used as the datasource for the
EmployeesBindin gSource, and the Employees table set as the datamember. All
controls on the form are bound to the EmployeesBindin gSource. Except for
the password ...
I set up separate handlers for the Password and bind this control manually
when I New() the form:
Private Sub BindPasswordCon trol()
Dim b As Binding = New Binding("Text", EmployeesBindin gSource,
"Password")
AddHandler b.Format, AddressOf PasswordFormat
AddHandler b.Parse, AddressOf PasswordParse
txtPassword.Dat aBindings.Add(b )
End Sub
Private Sub PasswordFormat( ByVal sender As Object, ByVal e As
ConvertEventArg s)
If IsDBNull(e.Valu e) = False Then
e.Value = EncryptPassword (CStr(e.Value))
End If
End Sub
Where is the PasswordParse sub ?
>
The handlers ARE being called, however, the Password column of the
strongly-typed dataset does not get changed to the password entered into
the Password textbox (it remains null). I can also see that the e.Value is
being passed to the EncryptPassword function. Yet when I check the
datatable, the Password column is empty (all other columns have the
correct data). What the heck am I overlooking here!?
According to your code, EncryptPassword is called inside PasswordFormat,
Format means DataSource->Control. If you ask me you should call
EncryptPassword inside Parse and DecryptPassword inside Format....
HTH,
Greetings
>
You are correct, the Encrypt/Decrypt were backwards. Two sets of eyes are
better than one. Thanks.
"Bart Mermuys" <bm************ *@hotmail.comwr ote in message
news:Nf******** *********@phobo s.telenet-ops.be...
Hi,
"Earl" <br******@newsg roups.nospamwro te in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>I'm adding password encryption to the Employees form. I have a strongly-typed dataset being used as the datasource for the EmployeesBindi ngSource, and the Employees table set as the datamember. All controls on the form are bound to the EmployeesBindin gSource. Except for the password ...
I set up separate handlers for the Password and bind this control manually when I New() the form:
Private Sub BindPasswordCon trol() Dim b As Binding = New Binding("Text", EmployeesBindin gSource, "Password") AddHandler b.Format, AddressOf PasswordFormat AddHandler b.Parse, AddressOf PasswordParse txtPassword.Dat aBindings.Add(b ) End Sub
Private Sub PasswordFormat( ByVal sender As Object, ByVal e As ConvertEventAr gs) If IsDBNull(e.Valu e) = False Then e.Value = EncryptPassword (CStr(e.Value)) End If End Sub
Where is the PasswordParse sub ?
>> The handlers ARE being called, however, the Password column of the strongly-typed dataset does not get changed to the password entered into the Password textbox (it remains null). I can also see that the e.Value is being passed to the EncryptPassword function. Yet when I check the datatable, the Password column is empty (all other columns have the correct data). What the heck am I overlooking here!?
According to your code, EncryptPassword is called inside PasswordFormat,
Format means DataSource->Control. If you ask me you should call
EncryptPassword inside Parse and DecryptPassword inside Format....
HTH,
Greetings
>> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Todd Johnson |
last post by:
I am creating a dialog in wxPython for log in
purposes. Basically when the user clicks the ok
button, the dialog box saves the user name and
password as class attributes. Then as long as the
dialog exists calling MyDialog.GetUserName() and
MyDialog.GetPassword() returns them. This seems
insecure to me. Is there a better way to go about this
or is it safe as long as I destroy the dialog as soon
as I am done with it?
|
by: Max |
last post by:
Hello all,
I am trying to protect a page within my site with a JS password
scheme.
Now I know JS can be quite easily "circumvented", but I came by a code
below.
My question is:
1. Is there a way to find a password for this script? How easily?
2. Is there a stronger scheme available in JS?
|
by: Ian Davies |
last post by:
Hello
I would like to query the user table of the mysql database from my VB
application to check that a user's password entered in a text field on a
form corresponds to that users password in the mysql database. However, when
I retreive the password using an sql statement into a recordset, it is
encrypted. How can I decrypt it so I can make the comparison.
Ian
|
by: newbie |
last post by:
Hello,
I face a practical problem with encryption.
I've read examples for encrypting a file with the DES algorythm. The
algorythm uses a key and a IV value. Both are 8 bytes if I'm correct, and
can be generated by the system or specified by me at design time.
How can I then do DES encryption with a password?
pwd: 8charact
|
by: PJones |
last post by:
I am looking for the best way to one way encrypt a password for storage in a
database using (asp.net / vb.net)
basically I need some functions or examples that I can freely use in a
commercial project
anyone got any good functions or links I can look at ?
I was looking at MD5 hash .. the examples I saw confused me as I didn't see
a key ?
Does MD5 not used a key ?
| |
by: =?Utf-8?B?am9uaWdy?= |
last post by:
I wrote a simple VB.NET application that imports and edits CSV files.
Now I’d like to “lock” the raw (pre-import) CSV files so these cannot be
opened separately. It is not high-sensitive data, I just don’t want folks to
peek in the files.
So time-consuming encryption is not necessary, just a simple
password-to-open that I can program in my application so it internally opens
the imported CSV file would be perfect, but I can’t...
|
by: Jeff Williams |
last post by:
I am developing an application which will allow users (students) to run
applications on PC's with elevated rights. This is necessary for some
applications which require Administrator rights on the PC.
I now need to store the local administrator username and password
somewhere where my application can read this from.
I am looking for comments on
1. Recommend place to store this data
|
by: Gilles Ganault |
last post by:
Hello
I'd like to encrypt a customer's organization name to use this as
their password to launch our application, and decrypt it within our
VB5 application.
We will then use this information to print it on every page that the
application prints out. That way, even if some other user gives out
his password, it won't do any good, since the organization name will
be the original user's.
|
by: Jon.Hakkinen |
last post by:
Hi all,
I'm on DB2 9.5 fp 0 on Windows.
I have a simple SQL stored procedure which uses the Encrypt() function
to insert data in a table.
I do not set the encryption password inside the procedure, I plan to
issue an Set Encryption statement at the beginning of every database
session from our middle layer.
But for now I use clp or db2ce to run something like
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |