Author Topic: BCryptGenRandom  (Read 95 times)

jj2007

  • Member
  • *****
  • Posts: 7896
  • Assembler is fun ;-)
    • MasmBasic
BCryptGenRandom
« on: December 12, 2017, 08:16:37 AM »
Rumours say it's fast and good quality...

include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  randbytes=1000000
  Let edi=New$(randbytes)
  Dll "BCrypt"
  Declare void BCryptGenRandom, 4
  BCryptGenRandom(0, edi, randbytes, 2)
  For_ ecx=0 To 29
        Print Str$("%i\n", dword ptr [edi+4*ecx])
  Next
  Inkey "hit any key"
EndOfCode