If I could give an advice on your method, in fact, what I would do.. is :
Generate a password with your lower security set of characters. Then upper
case randomizally some letters and finally inserts special chars at
randomized positions.
I don't know if you like the proposition, but it can help.
Jonathan Boivin
"Morten Snedker" <morten.snedker @gmail.coma écrit dans le message de news:
%2313bdRlmIHA.1 208@TK2MSFTNGP0 3.phx.gbl...
Generate a password with your lower security set of characters. Then upper
case randomizally some letters and finally inserts special chars at
randomized positions.
I don't know if you like the proposition, but it can help.
Jonathan Boivin
"Morten Snedker" <morten.snedker @gmail.coma écrit dans le message de news:
%2313bdRlmIHA.1 208@TK2MSFTNGP0 3.phx.gbl...
You certainly got a point there that I missed myself. Thanks for your
input.
>
Back to the drawing table :-)
>
Regards /Snedker
>
Family Tree Mike skrev:
input.
>
Back to the drawing table :-)
>
Regards /Snedker
>
Family Tree Mike skrev:
>Your medium and complex modes do not force the generator to pick from the
>other datasets, even though you add them to the list of random
>characters. This means that in a given scenario, even if you pass in
>"complex", you could get a password of "boogiewoog ie" (just an example,
>all from the lower case). Random doesn't guarantee one from each set, is
>what I am getting at. Our company requres the complex set, but at least
>one from each group.
>>
>"Morten Snedker" wrote:
>>
>other datasets, even though you add them to the list of random
>characters. This means that in a given scenario, even if you pass in
>"complex", you could get a password of "boogiewoog ie" (just an example,
>all from the lower case). Random doesn't guarantee one from each set, is
>what I am getting at. Our company requres the complex set, but at least
>one from each group.
>>
>"Morten Snedker" wrote:
>>
>>I'm using this for generating passwords. It seems to function okay.
>>Anything you guys reckon I missed out on?
>>>
>>>
>>'** CODE BEGIN
>>Public Class GeneratePasswor d
>>>
>> Public Shared Function GeneratePasswor d(ByVal Length As
>>Integer, ByVal Complexity As Complexity) As String
>>>
>> Dim characters As String =
>>"abcdefghijkl mnopqrstuvwxyz1 234567890"
>>>
>> If Complexity = Complexity.Medi um Or Complexity =
>>Complexity.Co mplex Then
>> characters += "ABCDEFGHIJKLMN OPQRSTUVWXYZ"
>> End If
>>>
>> If Complexity = Complexity.Medi um Then
>> characters += "!#%&/()=? "
>> End If
>>>
>> Dim password As String = ""
>> Dim random As New Random
>>>
>> For i As Integer = 0 To Length
>> password += characters.Subs tring(random.Ne xt(0,
>>characters.Le ngth - 1), 1)
>> Next
>>>
>> Return password
>>>
>> End Function
>>>
>> Public Enum Complexity
>> Simple
>> Medium
>> Complex
>> End Enum
>>>
>> End Class
>>'** CODE END
>>>
>>Regards /Snedker
>>>
>>Anything you guys reckon I missed out on?
>>>
>>>
>>'** CODE BEGIN
>>Public Class GeneratePasswor d
>>>
>> Public Shared Function GeneratePasswor d(ByVal Length As
>>Integer, ByVal Complexity As Complexity) As String
>>>
>> Dim characters As String =
>>"abcdefghijkl mnopqrstuvwxyz1 234567890"
>>>
>> If Complexity = Complexity.Medi um Or Complexity =
>>Complexity.Co mplex Then
>> characters += "ABCDEFGHIJKLMN OPQRSTUVWXYZ"
>> End If
>>>
>> If Complexity = Complexity.Medi um Then
>> characters += "!#%&/()=? "
>> End If
>>>
>> Dim password As String = ""
>> Dim random As New Random
>>>
>> For i As Integer = 0 To Length
>> password += characters.Subs tring(random.Ne xt(0,
>>characters.Le ngth - 1), 1)
>> Next
>>>
>> Return password
>>>
>> End Function
>>>
>> Public Enum Complexity
>> Simple
>> Medium
>> Complex
>> End Enum
>>>
>> End Class
>>'** CODE END
>>>
>>Regards /Snedker
>>>