473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Encoding password field with md5 hash

I would like to transfer data from an imported users and passwords table to my main users and passwords table.

The imported table shows the password field as plain text. I want to transfer this data into the main table and encode the password as an MD5 hash at the same time. Is there a way to do this?

Other fields / data I need to transfer at the same time are 'username', 'name', 'address', 'city', 'state'. These I want to keep as plain text and not MD5.
Sep 13 '07 #1
3 4340
pbmods
5,821 Expert 4TB
Heya, Brewster. Welcome to TSDN!

You'll want to use MySQL's MD5() function.
Sep 14 '07 #2
I am wondering if you could give me an example of some code. thanks.
Sep 14 '07 #3
mwasif
802 Expert 512MB
You can INSERT ... SELECT to select data from one table and insert into main table. When selecting data from imported table use MD5() to hash the passwords.e.g.
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO main_table (username, password, name, address, city, state)
  2. SELECT username, MD5(password), name, address, city, state FROM imported_table;
Sep 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
4
by: ScooterMX | last post by:
I have a page that is simply a password field. Doesn't scroll, do anything other than accept a password, and has a submit button. How can I automatically place the cursor in this password field...
4
by: feng | last post by:
For a HTTP textbox with a Type of "password", the default behaiver is that the field will be cleared out when the page is posted back. This make sense in most of the cases. But in some situation,...
4
by: J Sahoo | last post by:
Hello, I have a registration page where I am collecting user information (username, password, last name, age, etc...). I made the password field as PASSWORD (field type from the textbox). If user...
3
by: Neil Zanella | last post by:
Hello, I am trying to execute ADO.NET INSERT statement where one of the fields is coming from a password HTML control. When I access the text with password.Value and print with Response.Write...
10
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I have a webform which contains 2 dropdowns and a textbox with type="password". On "SelectedIndexChanged" event of the first dropdown, there is...
6
by: James | last post by:
Have a textbox that's in Password mode on a user creation page. Have several dropdowns that cause a PostBack out of necessity on this page. I cannot separate them. When one of these dropdowns...
7
by: fiefie.niles | last post by:
In ASP.Net I would like to create a text box that is a Password Field. How do I do that ? When I use the Textbox Field (from Toolbox - Standard), I did not find anything there that can make it a...
2
by: newkhan | last post by:
Hi Experts, I am currently using c#.net to complete my project and my problem is that for authentication i have used a form containing login and password fields but there is a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
0
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...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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...

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.