瀏覽代碼

[PAL] Document [_]DkRandomBitsRead

Michał Kowalczyk 5 年之前
父節點
當前提交
29f44c836b
共有 2 個文件被更改,包括 10 次插入0 次删除
  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);