Explorar o código

[PAL] Document [_]DkRandomBitsRead

Michał Kowalczyk %!s(int64=5) %!d(string=hai) anos
pai
achega
29f44c836b
Modificáronse 2 ficheiros con 10 adicións e 0 borrados
  1. 4 0
      Pal/src/pal.h
  2. 6 0
      Pal/src/pal_internal.h

+ 4 - 0
Pal/src/pal.h

@@ -488,6 +488,10 @@ void DkObjectClose (PAL_HANDLE objectHandle);
 PAL_NUM
 DkSystemTimeQuery (void);
 
+/*
+ * Cryptographically secure random.
+ * 0 on success, negative on failure.
+ */
 PAL_NUM
 DkRandomBitsRead (PAL_PTR buffer, PAL_NUM size);
 

+ 6 - 0
Pal/src/pal_internal.h

@@ -344,7 +344,13 @@ int _DkInternalLock (PAL_LOCK * mut);
 int _DkInternalUnlock (PAL_LOCK * mut);
 unsigned long _DkSystemTimeQuery (void);
 int _DkFastRandomBitsRead (void * buffer, int size);
+
+/*
+ * Cryptographically secure random.
+ * 0 on success, negative on failure.
+ */
 int _DkRandomBitsRead (void * buffer, int size);
+
 int _DkSegmentRegisterSet (int reg, const void * addr);
 int _DkSegmentRegisterGet (int reg, void ** addr);
 int _DkInstructionCacheFlush (const void * addr, int size);