473,836 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Databinding and encrypted password

Hi NG,

I don't know if I'm just missing the forest through the trees, or if it
is really that complicated:

I want to save a password that is entered/changed through a text control
in a form. The control is bound to a dataset and the password shall be
stored as an encrypted text in the database.

I first tried to control the en- and decryption in the textbox's Format
and Parse handler but I ended up in sometimes having the password either
unencrypted or twice encrypted in the db.

Then I tried to use Enter and Leave handlers to de- and encrypt the
password before saving but this way, too, I can end up with unencrypted
oder twice encrypted passwords in the db.

Did somebody have this kind of problem before and knows a solution or
could point me to the right direction? I searched the archives but could
not find anything fitting my case.

Thanks in advance.
Regards
Roland
Nov 17 '05 #1
2 2246
Roland,

Are you controlling the update and query manually? I would wrap the
call to update in a set of methods you could call which will do the
encrypting/decrypting for you when you update/query the database. This way,
you don't have to worry about the controls doing the encrypting.

Ideally, you would place this kind of functionality in the buisness
layer (or data layer, depending on your design), and it wouldn't be left to
the user to encrypt/decrypt these values.

Hopet his helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Roland Riess" <ce******@gmx.n et> wrote in message
news:uE******** ******@TK2MSFTN GP12.phx.gbl...
Hi NG,

I don't know if I'm just missing the forest through the trees, or if it is
really that complicated:

I want to save a password that is entered/changed through a text control
in a form. The control is bound to a dataset and the password shall be
stored as an encrypted text in the database.

I first tried to control the en- and decryption in the textbox's Format
and Parse handler but I ended up in sometimes having the password either
unencrypted or twice encrypted in the db.

Then I tried to use Enter and Leave handlers to de- and encrypt the
password before saving but this way, too, I can end up with unencrypted
oder twice encrypted passwords in the db.

Did somebody have this kind of problem before and knows a solution or
could point me to the right direction? I searched the archives but could
not find anything fitting my case.

Thanks in advance.
Regards
Roland

Nov 17 '05 #2
Hi Nicholas,

Nicholas Paldino [.NET/C# MVP] wrote:
Roland,

Are you controlling the update and query manually? Yes, I am.
I would wrap the
call to update in a set of methods you could call which will do the
encrypting/decrypting for you when you update/query the database. This way,
you don't have to worry about the controls doing the encrypting.

I think that is a good idea, I was too much clinging to the databinding
mechanisms of the controls - seems like if I wasn't wrong about the
forest and the trees :-)

Thanks a lot for pointing me to the right direction!

Regards
Roland
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
5496
by: sffan | last post by:
I am new to database programming and was curious how others solve the problem of storing encrypted in data in db table columns and then subsequently searching for these records. The particular problem that I am facing is in dealing with (privacy) critical information like credit-card #s and SSNs or business critical information like sales opportunity size or revenue in the database. The requirement is that this data be stored encrypted...
6
7529
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
2
6014
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database, and the linked tables are successfully created. I use the data from these linked tables in several forms. All works great until I close the Access frontend and open it again. When I try to use the forms, I get an error message: "Could not...
8
5237
by: KRoy | last post by:
I have a password stored in the Registry encrypted using System.Security.Cryptography DES Algorithm. I supplied it a password and a Initialization Vector. I am trying to decrypt it using the CryptoAPI in VB6. I am using the CryptDeriveKey to generate a session key from a password. But it is not working and I am sure the password is correct. In .net I supplied an IV, when and how do I do that using
5
6782
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would cause. If I could create a large file that could be encrypted, and maybe add files to it by appending them and putting in some kind of delimiter between files, maybe a homemade version of truecrypt could be constructed. Any idea what it...
2
7700
by: Bernard Dhooghe | last post by:
The information center writes: "Encryption Algorithm: The internal encryption algorithm used is RC2 block cipher with padding, the 128-bit secret key is derived from the password using a MD2 message digest. " and also explains how the length of the encrypted column can be derived.
0
1920
by: danishce | last post by:
I want to generate 8 byte key using CBC MAC by applying encryption to whole message in vb.net.My code is: //Main form Code Imports System.Security.Cryptography Dim plainText As String Dim cipherText As String Dim passPhrase As String Dim saltValue As String Dim hashAlgorithm As String
5
6100
by: Shmuel | last post by:
Hello, Is it possible to give to mysql_connect an encrypted (md5 or sha1) password? If not is there a workaround? I store passwords for users in database and don't want to use plain text passwords. Then I use that information to connect to the database. So every user have his own database.
4
6906
n8kindt
by: n8kindt | last post by:
i'm trying to create a secure scenario where no one will be able to know our encrypted database passcode. BUT if they login to a form in another database successfully, it will open the encrypted database and systematically plug in the passcode thru vba (kind of like a user on a website logging into a secure SQL database i suppose). i may be going about this whole situation completely wrong but here is what i have for the code that i need to...
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10852
Oralloy
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...
0
10553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10596
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,...
0
10255
tracyyun
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...
1
7793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6980
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();...
1
4459
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
3
3116
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.