Creates a new seed file suitable for use with
RNG_Initialize
.
Public Declare Function RNG_MakeSeedFile Lib "diCryptoSys.dll" (ByVal strSeedFile As String, ByVal strPrompt As String, ByVal nOptions As Long) As Long
nRet = RNG_MakeSeedFile(strSeedFile, strPrompt, nOptions)
long __stdcall RNG_MakeSeedFile( const char *szSeedFile, const char *szPrompt, long nOptions);
If successful, the return value is zero; otherwise it returns a non-zero error code.
Rng.MakeSeedFile Method (String, Rng.Strength)
Rng.MakeSeedFile Method (String, String, Rng.Strength)
static Rng.make_seedfile(seedfilename, strength=Strength.BITS_112, prompt='')
This uses a dialog window and expects the user to type in random keystrokes.
Such a GUI interface may not be appropriate in all circumstances.
A new seed file is always created. Any existing file with the same name will be overwritten without warning.
Alternatively, use the command-line program, ApiMkRngSeed.exe
, provided in the distribution
to make a new seed file [updated in v6.22].
Dim strSeedFile As String
Dim nRet As Long
strSeedFile = "seed.dat"
nRet = RNG_MakeSeedFile(strSeedFile, "Making a new seed file: hit random keys until done...", API_RNG_STRENGTH_128)
Debug.Print "RNG_MakeSeedFile('" & strSeedFile & "') returns " & nRet & " (expecting 0)"
RNG_Initialize
RNG_UpdateSeedFile