Not sure if this is a coding question or not. I have been working on some encryption routines for a password manager. While stress testing the routines on different machines, I ran into a problem on an old Windows 7 HP desktop. My other two machines are a Windows 10 all in one touch screen desktop, and a Windows 11 Laptop. All three are 64 bit machines. On the Windows 7 machine, Debug Len(Initvector$) returns semi random numbers ranging from 2 to 16 inside the test code, the other two machines consistently return 8.. What's even stranger is the the code below (taken exactly as you see it from the test code) always return 13 when run by itself on the windows 7 machine, but always 8 on the other two no matter what. Not sure what's going on here. Is this a hardware issue, a windows 7 issue? Using PB630 final on all machines.
Code: Select all
*InitVector = AllocateMemory(16)
OpenCryptRandom()
Repeat
CryptRandomData(*InitVector, 16)
InitVector$ = PeekS(*InitVector, 16)
Debug Len(Initvector$)
ForEver
CloseCryptRandom()


