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.

60 lines
1.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: rng.cxx
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 8-15-95 RichardW Created
  15. // 2-8-96 MikeSw Copied to NTLMSSP from SSL
  16. // 03-Aug-1996 ChandanS Stolen from net\svcdlls\ntlmssp\common\rng.c
  17. // 8-Dec-1997 SField Use crypto group RNG
  18. //
  19. //----------------------------------------------------------------------------
  20. #include <global.h>
  21. NTSTATUS
  22. SspGenerateRandomBits(
  23. VOID *pRandomData,
  24. ULONG cRandomData
  25. )
  26. {
  27. NTSTATUS Status;
  28. if( RtlGenRandom( pRandomData, cRandomData ) )
  29. {
  30. return STATUS_SUCCESS;
  31. }
  32. //
  33. // return a nebulous error message. this is better than returning
  34. // success which could compromise security with non-random key.
  35. //
  36. ASSERT( (STATUS_SUCCESS == STATUS_UNSUCCESSFUL) );
  37. return STATUS_UNSUCCESSFUL;
  38. }
  39. BOOL
  40. NtLmInitializeRNG(VOID)
  41. {
  42. return TRUE;
  43. }
  44. VOID
  45. NtLmCleanupRNG(VOID)
  46. {
  47. return;
  48. }