Public Sub GetRandomString(Source As String,Count As Int) As String
Dim Str As StringBuilder
Str.Initialize
For i = 0 To Count -1
Str.Append(Source.CharAt(Rnd(0,Source.Length)))
Next
Return Str.ToString
End Sub
How random do you want? You could also do something like use the Encryption library to produce one or more random numbers with the SecureRandom function. Use one of the message digest functions in the Encryption library to create a digest string, and then select nine characters from it, either using the function above, or simply picking a random start position for a substring.
How random do you want? You could also do something like use the Encryption library to produce one or more random numbers with the SecureRandom function. Use one of the message digest functions in the Encryption library to create a digest string, and then select nine characters from it, either using the function above, or simply picking a random start position for a substring.