Public Function RandomStringFast( _ ByRef vMinLength As Long _ , ByRef vMaxLength As Long _ , ByRef vAlphabet As String _ ) As String
Rnd(-1) = 0.224007 RandomStringFast(0, 16, CryptoAlphabet) = "" RandomStringFast(0, 16, CryptoAlphabet) = "D" RandomStringFast(0, 16, CryptoAlphabet) = "OM " RandomStringFast(10, 10, CryptoAlphabet) = "JRDLBUKXHU" RandomStringFast(10, 10, CryptoAlphabet) = "PZKSLARUXW" RandomStringFast(10, 10, CryptoAlphabet) = "CZANUGPSZU" CryptoAlphabet = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"Note: The call to the Visual Basic Rnd function in the above example seeds the Visual Basic random number generator so that the sample results can be reproduced. There is generally no need to call the Rnd function within your programs since Entisoft Tools initializes the Visual Basic random number generator once with "Randomize" statement.
RandomString Function RandomVariant Function EveryCharacterOfType FunctionvMinLength: Minimum length of the random string that will be returned. This argument is never modified even though it is passed by-reference.
vAlphabet: String containing that the characters that will be used to compose the random string. This argument is never modified even though it is passed by-reference. Function returns an empty string if the alphabet vAlphabet is an empty string.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.