소스 검색

[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);