Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: src/shared/platform/nacl_global_secure_random.h

Issue 537543003: Add a get_random_bytes() syscall to replace the SRPC-based implementation (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix glibc tests Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/shared/platform/nacl_global_secure_random.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Service Runtime. Secure RNG. Global singleton. 8 * NaCl Service Runtime. Secure RNG. Global singleton.
9 */ 9 */
10 10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_ 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_
12 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_ 12 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_
13 13
14 #include "native_client/src/shared/platform/nacl_secure_random.h" 14 #include "native_client/src/shared/platform/nacl_secure_random.h"
15 #include "native_client/src/shared/platform/nacl_sync.h" 15 #include "native_client/src/shared/platform/nacl_sync.h"
16 16
17 void NaClGlobalSecureRngInit(void); 17 void NaClGlobalSecureRngInit(void);
18 18
19 void NaClGlobalSecureRngSwitchRngForTesting(struct NaClSecureRng *); 19 void NaClGlobalSecureRngSwitchRngForTesting(struct NaClSecureRng *);
20 20
21 void NaClGlobalSecureRngFini(void); 21 void NaClGlobalSecureRngFini(void);
22 22
23 int32_t NaClGlobalSecureRngUniform(int32_t range_max); 23 int32_t NaClGlobalSecureRngUniform(int32_t range_max);
24 24
25 uint32_t NaClGlobalSecureRngUint32(void); 25 uint32_t NaClGlobalSecureRngUint32(void);
26 26
27 void NaClGlobalSecureRngGenerateBytes(uint8_t *buf, size_t buf_size);
28
27 /* 29 /*
28 * Generate a random alpha-numeric name for a socket, a semaphore or some 30 * Generate a random alpha-numeric name for a socket, a semaphore or some
29 * other device. 31 * other device.
30 */ 32 */
31 void NaClGenerateRandomPath(char *path, int length); 33 void NaClGenerateRandomPath(char *path, int length);
32 34
33 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_ */ 35 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_GLOBAL_SECURE_RANDOM_H_ */
OLDNEW
« no previous file with comments | « no previous file | src/shared/platform/nacl_global_secure_random.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698