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

Password Generator

I'm looking for a password generator.

example: I pass as parameter a string and the function return a
password.(string)

can anyone provide me any password generator ????

thanks
André - Brazil



Nov 20 '05 #1
4 1616
* "avillela" <av******@cpqd.com.br> scripsit:
I'm looking for a password generator.

example: I pass as parameter a string and the function return a
password.(string)

can anyone provide me any password generator ????


Did you have a look for algorithms with Google?!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
RDI
Are you wanting to generate a "Real" word? Or just a string of letters and numbers?

If the latter will work (like for a TEMPORARY pw generator), the function below will do it (getGenericPW). If you need the former, you could create an array of words and or phrases that you want to have available. The use the rnd function to randomly choose one of these words as shown in getSpecPW.

Other than these solutions, I have nothing to offer.

function getSpecPW() as string
dim count as integer = 1000 'total number of available words minus one (zero based)
dim pwArray(count)
return pwArray(Int((count - 0 + 1) * Rnd() + 0))
end function

Function getGenericPW() As String
Dim pw As String = ""
Dim cnt As Integer

'charCount is the number of characters in the desired pw
Dim charCount As Integer = 6
For cnt = 0 To charCount
'randomly choose between adding a number, UPPER or lower character
Select Case Int((3 - 1 + 1) * Rnd() + 1)
Case 1 'generate a number
pw = pw & Chr(Int((57 - 48 + 1) * Rnd() + 48))
Case 2 'generate an upper case letter
pw = pw & Chr(Int((90 - 65 + 1) * Rnd() + 65))
Case 3 'generate a lower case letter
pw = pw & Chr(Int((122 - 97 + 1) * Rnd() + 97))
End Select
Next
Return pw
End Function

--

RDI

(remove the exclamation from the email address)

"avillela" <av******@cpqd.com.br> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I'm looking for a password generator.

example: I pass as parameter a string and the function return a
password.(string)

can anyone provide me any password generator ????

thanks
André - Brazil






Nov 20 '05 #3
RDI
Of course, if you really want the SPECIFIC version, an array with a decent number of strings will take a LOT of resources. It might be better to use an INI file.

I have downloaded a set of API wrappers that process ini files, if that's the route you want to go, I'll post them.

it would look something like this

declare the wrappers.
blah blah

function getPWfromINI () as string
dim count as integer = 1000 'total number of available words minus one (zero based)
return getINI("Passwords", "PW" & (Int((count - 0 + 1) * Rnd() + 0), "")
end function

and the INI file would look like

[Passwords]
PW0=kitchen
PW1=pencil
......so on.....

--

RDI

(remove the exclamation from the email address)

"RDI" <RDI!@!WriteMe.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Are you wanting to generate a "Real" word? Or just a string of letters and numbers?

If the latter will work (like for a TEMPORARY pw generator), the function below will do it (getGenericPW). If you need the former, you could create an array of words and or phrases that you want to have available. The use the rnd function to randomly choose one of these words as shown in getSpecPW.

Other than these solutions, I have nothing to offer.

function getSpecPW() as string
dim count as integer = 1000 'total number of available words minus one (zero based)
dim pwArray(count)
return pwArray(Int((count - 0 + 1) * Rnd() + 0))
end function

Function getGenericPW() As String
Dim pw As String = ""
Dim cnt As Integer

'charCount is the number of characters in the desired pw
Dim charCount As Integer = 6
For cnt = 0 To charCount
'randomly choose between adding a number, UPPER or lower character
Select Case Int((3 - 1 + 1) * Rnd() + 1)
Case 1 'generate a number
pw = pw & Chr(Int((57 - 48 + 1) * Rnd() + 48))
Case 2 'generate an upper case letter
pw = pw & Chr(Int((90 - 65 + 1) * Rnd() + 65))
Case 3 'generate a lower case letter
pw = pw & Chr(Int((122 - 97 + 1) * Rnd() + 97))
End Select
Next
Return pw
End Function

--

RDI

(remove the exclamation from the email address)

"avillela" <av******@cpqd.com.br> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I'm looking for a password generator.

example: I pass as parameter a string and the function return a
password.(string)

can anyone provide me any password generator ????

thanks
André - Brazil






Nov 20 '05 #4
you could use the hashfor storing method that comes with .net..??
"RDI" <RDI!@!WriteMe.com> wrote in message news:#u**************@TK2MSFTNGP09.phx.gbl...
Of course, if you really want the SPECIFIC version, an array with a decent number of strings will take a LOT of resources. It might be better to use an INI file.

I have downloaded a set of API wrappers that process ini files, if that's the route you want to go, I'll post them.

it would look something like this

declare the wrappers.
blah blah

function getPWfromINI () as string
dim count as integer = 1000 'total number of available words minus one (zero based)
return getINI("Passwords", "PW" & (Int((count - 0 + 1) * Rnd() + 0), "")
end function

and the INI file would look like

[Passwords]
PW0=kitchen
PW1=pencil
.....so on.....

--

RDI

(remove the exclamation from the email address)

"RDI" <RDI!@!WriteMe.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Are you wanting to generate a "Real" word? Or just a string of letters and numbers?

If the latter will work (like for a TEMPORARY pw generator), the function below will do it (getGenericPW). If you need the former, you could create an array of words and or phrases that you want to have available. The use the rnd function to randomly choose one of these words as shown in getSpecPW.

Other than these solutions, I have nothing to offer.

function getSpecPW() as string
dim count as integer = 1000 'total number of available words minus one (zero based)
dim pwArray(count)
return pwArray(Int((count - 0 + 1) * Rnd() + 0))
end function

Function getGenericPW() As String
Dim pw As String = ""
Dim cnt As Integer

'charCount is the number of characters in the desired pw
Dim charCount As Integer = 6
For cnt = 0 To charCount
'randomly choose between adding a number, UPPER or lower character
Select Case Int((3 - 1 + 1) * Rnd() + 1)
Case 1 'generate a number
pw = pw & Chr(Int((57 - 48 + 1) * Rnd() + 48))
Case 2 'generate an upper case letter
pw = pw & Chr(Int((90 - 65 + 1) * Rnd() + 65))
Case 3 'generate a lower case letter
pw = pw & Chr(Int((122 - 97 + 1) * Rnd() + 97))
End Select
Next
Return pw
End Function

--

RDI

(remove the exclamation from the email address)

"avillela" <av******@cpqd.com.br> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I'm looking for a password generator.

example: I pass as parameter a string and the function return a
password.(string)

can anyone provide me any password generator ????

thanks
André - Brazil








Nov 20 '05 #5

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

Similar topics

0
by: Ludwig77 | last post by:
I'm trying to password protect a directory on my web site. I'm using the password encryption generator located at http://resma.net/tutorials/htaccess.php# I can't seem to get my login to work. I...
36
by: dcrespo | last post by:
Hi all, I have a program that serves client programs. The server has a login password, which has to be used by each client for logging in. So, when the client connects, it sends a string with a...
0
by: com | last post by:
MS Access 2000 Password Recoverer 4.2 Screenshot - Soft30.com MS Access 2000 Password Recoverer will display the password to a MS Access database (*.mdb). This program works for MS Access files...
0
by: avillela | last post by:
I'm looking for a password generator. example: I pass as parameter a string and the function return a password.(string) can anyone provide me any password generator ???? thanks André -...
4
by: David Eadie | last post by:
G'Day all, I cant work out how to create a random password generator. In specific the password (or well the output as a string) needs to be in the following format: abc123 So no capitals or...
26
by: David Garamond | last post by:
I read that the password hash in pg_shadow is salted with username. Is this still the case? If so, since probably 99% of all PostgreSQL has "postgres" as the superuser name, wouldn't it be better...
14
by: avanti | last post by:
Hi, I need to generate random alphanumeric password strings for the users in my application using Javascript. Are there any links that will have pointers on the same? Thanks, Avanti
2
by: RYAN1214 | last post by:
How can I use this random password code, and then insert the password into email which is sent to the user after the registration has been finished? thx <html> <head> <title>Javascript:...
3
by: ashishpandey | last post by:
i am in great need of source code of random password generator in c language. please help me by sending the c code random password generator. my email id:<removed>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.