19 1986
You run the input through the function before storing it in the table.
NeoPa 32,556
Expert Mod 16PB
And when a password is entered on your form as credentials, you run it through the encryption algorithm and compare the result with what was stored.
Could this be in the AfterUpdate method??
NeoPa 32,556
Expert Mod 16PB
It could be, but for something like this you typically want to allow the operator to make changes before confirming the credentials to use, so you put the code behind a Command Button.
Ok so if I create a new operator, I should have the password field. Enter the desired password and on the click of the command button to create the operator I should enter the code!
The code: can it be saved as a module and then be called back on the click of the button?
How do I call it then?
Hope my question is clear?
NeoPa 32,556
Expert Mod 16PB Ryno Bower:
Ok so if I create a new operator, I should have the password field. Enter the desired password and on the click of the command button to create the operator I should enter the code!
You call the code passing your actual password, then save the returned value in your table. Ryno Bower:
The code: can it be saved as a module and then be called back on the click of the button?
Yes. It's saved in a module. There's no other way I know of using it. Ryno Bower:
How do I call it then?
You say something like : - SavedPassword = SHA(Me.txtPassword)
A quick note about the return value of the function, it returns a 32 byte array. You will have to convert that to a string before storing it in a field. You can either store the hash as its byte for byte string equivalent (nonprintable characters and all) or you can store it as a more human friendly hexadecimal string. The former uses less space but can't be read by a human and the latter is the opposite.
I need help!
I have created the code (module) and called it PasswordCode.
I have a form and on the form is fields UserName linked to the underlying table.
Also I have an unbound text field called txtPassword with the password input mask.
Also I have the password field linked to the underlying table callled SavedPassword.
Also I have a button. I have the code as you suggested when I click the button.
SavedPassword = SHA(meMtxtPassword)
When I click the button it should insert the encrypted password into the SavedPassword field right?
I get an error message that the value you entered isn't valid for this field.
Is my code right?
Refer to my previous post.
Would it look something like this? - Dim spw As String
-
spw = me.SavedPassword
-
-
Spw = SHA(me.txtPassword)
I still get error 94: invalid use of null
Please help
You didn't pick one of the two options I laid out in post #8. But whichever option you decide to choose, that's not what it would look like. At a minimum, you would need a loop to iterate through the array that's returned.
Could you give me a sample code?
This is confusing to me.
I thought that I made the field a string as you said earlier!
Thanks
I don't see anything in your code that changes the 32 byte integer array into a string.
Here's an example of a loop. - Dim i, j
-
j = 0
-
For i = 0 To 31
-
j = j + 1
-
Next
It adds 1 to j 32 times.
Ok thanks.
But I don't think ill know to interpret that into changing the field toa string!
I guess I am just to dumb to understand it!
What you should do is find a good VBA tutorial and have a go at that before returning to this.
NeoPa 32,556
Expert Mod 16PB Ryno Bower:
I guess I am just to dumb to understand it!
We all start somewhere Ryno.
What is certainly less than clever is to ask for help with the very basics of code without first putting some effort into getting to speed up to at least that level. You wouldn't ask a heart surgeon to put a plaster on for you. You would be expected to manage that all by yourself. It's basic, and easily achievable, with a minimum of effort and without the need to ask for assistance.
Any suggestions where I could find tutorials on VBA?
By the way! If I get this right, will the password show as ******?
NeoPa 32,556
Expert Mod 16PB Ryno Bower:
Any suggestions where I could find tutorials on VBA?
Try theses : - Microsoft Access Tutorials (Strive4Peace).
- Microsoft Access Tutorials
- Microsoft Office Tutorials.
- VBA Tutorial (Excel).
They may not all suit you but I expect you'll find some of them very helpful.
Remember though, you may need a better understanding of the fundamentals of coding too. These can help with that to a limited extent, and they're what I have as I work in this area. Try some of them and see if this thread makes more sense to you. If not, look out for something that deals with the fundamentals of programming, rather than these which are are MS Office-specific. Ryno Bower:
By the way! If I get this right, will the password show as ******?
On your form it will show that way as it is only ever shown when the operator types it in. You should never display a saved password, even though it's in an encrypted form.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Klaus Kragelund |
last post by:
Hi
I'm using DreamWeaver 2004 on a Win2k machine to create my homepage.
After spending several hours of mingling with ASP I discover that my
ISP doesn't support Access databases. So I turned to...
|
by: Jerry |
last post by:
Is there a webforms equivalent to the HTML password box control?
I don't see one in the toolbox.
Regards
|
by: Pavan |
last post by:
Hi All,
I am using Password Recovery control in order to reset my hashed passwords
in ASP .Net 2.0 Beta 2.
The system generated password is too difficult to remember, so i am giving
Change...
|
by: John |
last post by:
Hi
I am using the Change Password control which works fine and changes the
password. I have two problems;
1. After password has been changed, pressing continue goes no where. How can
I tell...
|
by: xpcer |
last post by:
Hai everybody
i have an question,
if we use mysql, we can encrypt our password using md5() function,
other wise, i want to encrypt my password in sql server 2000, can anyone tell me, what...
|
by: =?Utf-8?B?V2FubmFiZQ==?= |
last post by:
I added a change password control to my application and when I run the page
that has it, I get an error:
Generating user instances in SQL Server is disabled. Use sp_configure 'user
instances...
|
by: parshupooja |
last post by:
Hi
I have created a login page which has user name n password. After entering values it authenticate from SQL Server and if it is correct, it forwards to designated page otherwise shows invalid...
|
by: olafinsbraaten |
last post by:
I am using column-level encryption (ENCRYPT_CHAR, DECRYPT_CHAR) to
protect selected columns in DB2 LUW v.9.1 and v.9.5 on Linux. The
ultimate goal is to support the requirements put forward in...
|
by: zacks |
last post by:
I'm not sure when it came into being, since this it the first time I
have worked very much with a password control in .NET, but if a
textbox that has a non-empty value for PasswordChar or the...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
| |