473,394 Members | 1,674 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,394 software developers and data experts.

Hash Passwords

Hello,

I created a login system and I my passwords are being hashed.

I need to check if everything is working so I need to generate some
hashed passwords to replace the actual passwords I have in this moment
in my database. How can I do this?

I have the following data in my database:
USER PASSWORD
Mike London
Marie Book
Katie NoNe

I want to hash the 3 passwords so I can change my database and test my
login system. How can I do this?

The login system has this:
....
Dim ticket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, tbusername.Text, DateTime.Now,
DateTime.Now.AddMinutes(30), True, reader.GetString(0),
FormsAuthentication.FormsCookiePath)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As HttpCookie = New
HttpCookie(FormsAuthentication.FormsCookieName, hash)

Thanks,
Miguel

Nov 19 '05 #1
1 1361
FormsAuthenticaiton has a HashPasswordForStoringInConfigFile API to help.
BTW, this is about the worst named API I've ever seen -- you can store those
hashed passwords anywhere... even in a database :)

Pass "SHA1" as the second param to the API.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello,

I created a login system and I my passwords are being hashed.

I need to check if everything is working so I need to generate some
hashed passwords to replace the actual passwords I have in this moment
in my database. How can I do this?

I have the following data in my database:
USER PASSWORD
Mike London
Marie Book
Katie NoNe
I want to hash the 3 passwords so I can change my database and test my
login system. How can I do this?

The login system has this:
...
Dim ticket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, tbusername.Text, DateTime.Now,
DateTime.Now.AddMinutes(30), True, reader.GetString(0),
FormsAuthentication.FormsCookiePath)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As HttpCookie = New
HttpCookie(FormsAuthentication.FormsCookieName, hash)
Thanks,
Miguel


Nov 19 '05 #2

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

Similar topics

1
by: Matt | last post by:
I'm trying to develop under the newest MySQL using PHP. Problem is that the newer versions of MySQL use a beafier hashing algorithm. I can reverse the hash to a 16 bit one within MySQL, but I don't...
6
by: Stan | last post by:
Is it possible to hash a 100 bytes string to a integer? I found a few .NET classes for that such as Sha1Managed.ComputeHash but they return bytes. I am just not sure about the idea of converting...
2
by: Phil Townsend | last post by:
I have been asked to rewrite some apps that contain databases of username and passwords to store the passwords as hashes. Getting the data into a hash format is no problem. however, how do I go...
8
by: Adam Carpenter | last post by:
Hello, I have my users passwords stored to my DB hashs created using SHA1CryptoServiceProvider, here is the function: Public Shared Function EncryptPassword(ByVal password As String) As Byte()...
3
by: nasirmajor | last post by:
dear all; my simple quetion is that if we have hashed the users passwords and stored in databases. then can we use that hash code e.g D52987198EA2730FD22A38E7976344D843A7FFA0 in query string....
1
by: TheCite | last post by:
I am trying to make a function to hash passwords with. Here is the code: Option Compare Database Option Explicit 'function declarations Private Declare Function CryptAcquireContext Lib...
3
by: brewster | last post by:
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...
4
by: ChipAuger | last post by:
Hello Group, Thank you in advance to the group for all responses and help. I'm looking for a 1-way hash for storing passwords on an older embedded system that would be computationally stressed...
4
by: MS | last post by:
Hi, I'm writing a PHP login script for a web site. I've looked at several examples on the web and some of them use MD5 hashes for the password. They do this in various ways. EG. a) Storing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
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,...

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.