Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
554 B

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: rng.c
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 11-05-97 jbanes Modified to use static rsaenh.dll.
  15. //
  16. //----------------------------------------------------------------------------
  17. #include <spbase.h>
  18. VOID GenerateRandomBits(PUCHAR pbBuffer,
  19. ULONG dwLength)
  20. {
  21. CryptGenRandom(g_hRsaSchannel, dwLength, pbBuffer);
  22. }