CryptoSys API examples VB6 to VB.NET

RNG_MakeSeedFile

Creates a new seed file suitable for use with RNG_Initialize.

VB6/VBA

Debug.Print "Testing RNG_MakeSeedFile ..."
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)"

Output

Testing RNG_MakeSeedFile ...
RNG_MakeSeedFile('seed.dat') returns 0 (expecting 0)

VB.NET

Debug.Print("Testing RNG_MakeSeedFile ...")
Dim strSeedFile As String
''Dim nRet As Long
Dim fIsOK As Boolean

strSeedFile = "seed.dat"
fIsOK = Rng.MakeSeedFile(strSeedFile)
Debug.Print("RNG_MakeSeedFile('" & strSeedFile & "') returns " & fIsOK & " (expecting TRUE)")

[Contents]

[HOME]   [NEXT: RNG_NonceDataHex...]

Copyright © 2009-20 D.I. Management Services Pty Ltd. All rights reserved.