X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-rand-windows.c;h=638f8b38ed5d142f90a9905003f9448fe7fe2581;hb=52418d713f478a9f23cdb1a76575d58bea225009;hp=2ff32a99fa15977b4b2fe21b76e31aeb6e7a6ed8;hpb=a5fc1343a36f9609a5bb2d7aa9142398f6887bbc;p=mono.git diff --git a/mono/utils/mono-rand-windows.c b/mono/utils/mono-rand-windows.c index 2ff32a99fa1..638f8b38ed5 100644 --- a/mono/utils/mono-rand-windows.c +++ b/mono/utils/mono-rand-windows.c @@ -1,5 +1,6 @@ -/* - * mono-rand-windows.c: Windows rand support for Mono. +/** + * \file + * Windows rand support for Mono. * * Copyright 2016 Microsoft * Licensed under the MIT license. See LICENSE file in the project root for full license information. @@ -12,7 +13,7 @@ #if defined(HOST_WIN32) #include -#include "mono/utils/mono-rand-windows.h" +#include "mono/utils/mono-rand-windows-internals.h" #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) #ifndef PROV_INTEL_SEC @@ -78,12 +79,10 @@ mono_rand_open (void) /** * mono_rand_init: - * @seed: A string containing seed data - * @seed_size: Length of seed string - * - * Returns: On success, a non-NULL handle which can be used to fetch random data from mono_rand_try_get_bytes. On failure, NULL. - * + * \param seed A string containing seed data + * \param seed_size Length of seed string * Initializes an RNG client. + * \returns On success, a non-NULL handle which can be used to fetch random data from \c mono_rand_try_get_bytes. On failure, NULL. */ gpointer mono_rand_init (guchar *seed, gint seed_size) @@ -113,21 +112,19 @@ mono_rand_init (guchar *seed, gint seed_size) /** * mono_rand_try_get_bytes: - * @handle: A pointer to an RNG handle. Handle is set to NULL on failure. - * @buffer: A buffer into which to write random data. - * @buffer_size: Number of bytes to write into buffer. - * @error: Set on error. - * - * Returns: FALSE on failure and sets @error, TRUE on success. - * + * \param handle A pointer to an RNG handle. Handle is set to NULL on failure. + * \param buffer A buffer into which to write random data. + * \param buffer_size Number of bytes to write into buffer. + * \param error Set on error. * Extracts bytes from an RNG handle. + * \returns FALSE on failure and sets \p error, TRUE on success. */ gboolean mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, MonoError *error) { MONO_WIN32_CRYPT_PROVIDER_HANDLE provider; - mono_error_init (error); + error_init (error); g_assert (handle); provider = (MONO_WIN32_CRYPT_PROVIDER_HANDLE) *handle; @@ -160,8 +157,7 @@ mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, Mon /** * mono_rand_close: - * @handle: An RNG handle. - * + * \param handle An RNG handle. * Releases an RNG handle. */ void