CryptoSys PKI Pro Manual

RNG_String

Generates a string of random characters (classic VB6/VBA only).

VBA/VB6 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)

C/C++ Syntax

[Not applicable]

Parameters

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

Returns (VBA/C)

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

.NET Equivalent

Not applicable

Remarks

@deprecated. This is an alias for classic Visual Basic (VB6/VBA) 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]

[PREV: RNG_Number...]   [Contents]   [Index]   
   [NEXT: RNG_StringWithPrompt...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.