CryptoSys PKI Toolkit Manual

RNG_String

Is an alias for RNG_Bytes that generates a a string of random chars in Visual Basic (VB6) only [deprecated].

VB6/VBA Syntax

Public Declare Function RNG_String Lib "diCrPKI.dll" Alias "RNG_Bytes" (ByVal strData As String, ByVal nDataLen As Long, ByVal strSeed As String, ByVal nSeedLen As Long) As Long

nRet = RNG_String(strData, nDataLen, strSeed, nSeedLen)

Parameters

strData
[out] String to receive the random data.
nDataLen
[in] Long specifying the required length in bytes.
strSeed
[in] String containing a user-specified seed to be used by the random number generator. Specify an empty string ("") to ignore.
nSeedLen
[in] Long specifying the length of the seed string.

C/C++ Syntax

Not applicable

Returns (VB6/C)

Long: If successful, the return value is zero; otherwise it returns a nonzero error code.

.NET Equivalent

Not applicable

.NET Return Value

Refer to the .NET Help File for more details.

Remarks

This alias is for classic Visual Basic (VB6) users only. The output string may contain characters with value zero (and possibly traces of nuts). Storing binary information in a string is bad practice. This function was provided for one specific purpose and is deprecated. See Random Number Generator for more information on the RNG and seeds.

Example

See Also

RNG_Bytes

[Contents] [Index]

[HOME]   [NEXT: RNG_StringWithPrompt...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.